On Aug 18, 2009, at 4:45 AM, Anton Korobeynikov wrote:> Hi, Chris > > Just FYI: libstdc++ on linux is definitely miscompiled. > E.g.:hi Anton, Do you have any idea what patch is causing this or what the problem is? I don't have a linux box handy to diagnose this on. -Chris> > $ cat test.cpp > #include <vector> > #include <iostream> > > class A { > public: > A() { printf("Ctor!\n"); }; > ~A() { printf("Dtor!\n"); }; > }; > > static A foo; > > int main(void) { > std::vector<int> v; > > v.push_back(1); > > std::cout << "This is really test message" << std::endl; > std::cout << "v[0]: " << v[0] << std::endl; > return v.size(); > } > > > $ ./llvm-g++ -static test.cpp && ./a.out > Ctor! > Segmentation fault > > valgrind is not clean on this a.out file. gcc-compiled libstdc++ is > ok. > Currently I'm trying to figure out the status of mingw stuff. Later > hopefully I'll try to return to this problem. > > -- > With best regards, Anton Korobeynikov. > > Faculty of Mathematics & Mechanics, Saint Petersburg State University. >
2009/8/18 Chris Lattner <clattner at apple.com>:> On Aug 18, 2009, at 4:45 AM, Anton Korobeynikov wrote: >> Hi, Chris >> >> Just FYI: libstdc++ on linux is definitely miscompiled. >> E.g.: > > hi Anton, > > Do you have any idea what patch is causing this or what the problem > is? I don't have a linux box handy to diagnose this on.Try a "svn up". I was having a similar problem and found that it was already fixed in a newer revision.> -ChrisCheers, -- Rafael Avila de Espindola Google | Gordon House | Barrow Street | Dublin 4 | Ireland Registered in Dublin, Ireland | Registration Number: 368047
On Aug 18, 2009, at 9:58 AM, Rafael Espindola wrote:> 2009/8/18 Chris Lattner <clattner at apple.com>: >> On Aug 18, 2009, at 4:45 AM, Anton Korobeynikov wrote: >>> Hi, Chris >>> >>> Just FYI: libstdc++ on linux is definitely miscompiled. >>> E.g.: >> >> hi Anton, >> >> Do you have any idea what patch is causing this or what the problem >> is? I don't have a linux box handy to diagnose this on. > > Try a "svn up". I was having a similar problem and found that it was > already fixed in a newer revision.Awesome! :) -Chris