| Summary: | i686 + static link + not calling any stdio functions = segfault | ||
|---|---|---|---|
| Product: | uClibc | Reporter: | Anders Eriksson <denblomstertid> |
| Component: | Other | Assignee: | Bernhard Reutner-Fischer <aldot> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | aldot, uclibc-cvs |
| Priority: | P4 | Keywords: | patch |
| Version: | 0.9.31 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | i686, kernel 2.6.31 | |
| Build: | Same as target | ||
| Attachments: |
possible fix
possible fix, without pthreads handling Alternative fix |
||
|
Description
Anders Eriksson
2010-02-03 18:53:35 UTC
http://gcc.gnu.org/PR32219 We can workaround it, but it's not really pretty (using a table to store the addr, and checking that instead seems to work for me. Let me have a look..) trivial testcase:
#include <unistd.h>
#include <stdio.h>
int main(void)
{
write(1, "write\n", 6);
#ifdef USE_STDIO
puts("stdio");
#endif
return 0;
}
Created attachment 1033 [details]
possible fix
Please test this patch against master.
Created attachment 1039 [details]
possible fix, without pthreads handling
Anders, do you have DOPIC set in your .config? Created attachment 1735 [details]
Alternative fix
(In reply to comment #6) > Created attachment 1735 [details] > Alternative fix applied as 2e53dd645d5348f207cec7f8595969dc566c5a55 |