Description of problem: Firstly: I'm not sure where the problem actually lies - could be glibc, could be gcc, could be invalid testcase. I'm filing this so it won't get lost in the case it's a real bug we would want to fix in RHEL4. NOTABUG is expected, but I want to be sure. When testing bug 479630, I've encountered a SEGV on the testcase provided by customer, on something like this, if present in a shared library compiled with -fPIC: static __thread char whatever[100]; void do_stuff(){ printf("whatever=%p\n", whatever); } Because I haven't seen the SEGV on other arches, and even RHEL5 on ia64, I assumed it's a bug. I've tried to narrow down the issue, but I'm not sure if the reductio is valid, so I will append both testcases. Version-Release number of selected component (if applicable): gcc-3.4.6-10.ia64 glibc-2.3.4-2.41.ia64 How reproducible: always Steps to Reproduce (original reproducer) 1) untar the TLS.tar.gz 2) cd TLS; make 3) LD_LIBRARY_PATH=. ./ldmain Steps to Reproduce (my reduced reproducer) 1) untar the tc.tar.gz 2) cd tc 3) make test-fpic-thread Actual results: SEGV Expected results: no SEGV
Created attachment 330652 [details] original customer testcase
Created attachment 330655 [details] reduced testcase
This cannot possibly be a glibc problem. The printf function expects an absolute pointer to the string. It is the compilers job to covert the magic __thread variable access into such a pointer. If this fails it is the compilers problem.
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. Please See https://access.redhat.com/support/policy/updates/errata/ If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.