[Bug target/81142] Segmentation fault when using static __thread variables

2019-08-02 Thread laforge at gnumonks dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #14 from Harald Welte --- Hi Tomas, thanks a lot for your suggested workaround. Indeed -mtls-dialect=gnu2 seems to be working also in our case. -fPIE as suggested earlier is not an option as the __thread variables are used in a

[Bug target/81142] Segmentation fault when using static __thread variables

2019-08-02 Thread laforge at gnumonks dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #13 from Harald Welte --- Created attachment 46657 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46657=edit the reproducer created by osmocom

[Bug target/81142] Segmentation fault when using static __thread variables

2019-08-01 Thread tomas_paukrt at conel dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #12 from tomas_paukrt at conel dot cz --- Hi Herald, have you tried to cross-compile the library with -mtls-dialect=gnu2 ? We are using this option as a workaround for this bug because no one seems to be interested in fixing it. I

[Bug target/81142] Segmentation fault when using static __thread variables

2019-08-01 Thread laforge at gnumonks dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #11 from Harald Welte --- more than two years later, we can reproduce and observe this bug in a variety of ARM32 platforms, including raspbian 9 (with any gcc version shipped there, up to 6.3.x) and rapsbian 10 (up to gcc 6.5, but

[Bug target/81142] Segmentation fault when using static __thread variables

2017-06-22 Thread tomas_paukrt at conel dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #10 from tomas_paukrt at conel dot cz --- > What happens if you use -fPIE since that is designed to create executables > that are position independent and would do the right thing as far as various > initializations go ? It does not

[Bug target/81142] Segmentation fault when using static __thread variables

2017-06-22 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 Ramana Radhakrishnan changed: What|Removed |Added CC||ramana at gcc dot gnu.org ---

[Bug target/81142] Segmentation fault when using static __thread variables

2017-06-22 Thread tomas_paukrt at conel dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #8 from tomas_paukrt at conel dot cz --- Conditions for reproducing the bug: - ARM architecture - O1 or better optimalization - TLS model global-dynamic or local-dynamic - TLS dialect gnu - at least two static thread local variables

[Bug target/81142] Segmentation fault when using static __thread variables

2017-06-21 Thread tomas_paukrt at conel dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #7 from tomas_paukrt at conel dot cz --- I attached another C source file that is even simpler. Compiled program causes segmentation fault on AM335X (Cortex-A8) as well as on SPEAr320S-2 (ARM926EJ-S). Using option

[Bug target/81142] Segmentation fault when using static __thread variables

2017-06-21 Thread tomas_paukrt at conel dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #6 from tomas_paukrt at conel dot cz --- Created attachment 41595 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41595=edit C source file without snprintf

[Bug target/81142] Segmentation fault when using static __thread variables

2017-06-21 Thread tomas_paukrt at conel dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 tomas_paukrt at conel dot cz changed: What|Removed |Added Known to fail||4.9.4, 5.4.0, 6.3.0 ---

[Bug target/81142] Segmentation fault when using static __thread variables

2017-06-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 Richard Biener changed: What|Removed |Added Target||arm --- Comment #4 from Richard Biener

[Bug target/81142] Segmentation fault when using static __thread variables

2017-06-20 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #3 from Andrew Pinski --- This could be a glibc, binutils or gcc issue. You have more than one page of TLS variables here. I don't remember the limits but it might be you are hitting that limit.

[Bug target/81142] Segmentation fault when using static __thread variables

2017-06-20 Thread tomas_paukrt at conel dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #2 from tomas_paukrt at conel dot cz --- Created attachment 41593 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41593=edit Output of gcc -v

[Bug target/81142] Segmentation fault when using static __thread variables

2017-06-20 Thread tomas_paukrt at conel dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81142 --- Comment #1 from tomas_paukrt at conel dot cz --- Created attachment 41592 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41592=edit Preprocessed source file