Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEGV while running shared variable initialization code #9

Closed
gary-funck opened this issue Feb 28, 2013 · 2 comments
Closed

SEGV while running shared variable initialization code #9

gary-funck opened this issue Feb 28, 2013 · 2 comments
Assignees
Labels

Comments

@gary-funck
Copy link

Three of the intrepid tests fail with a segmentation fault.

./test18 -n 8
test: test18 opt: -O0 threads: dynamic elapsed: 0.102 user: 0.000 sys: 0.000
thread 0 terminated with signal: 'Segmentation fault'
failed: status = 143
--
./test25 -n 8
test: test25 opt: -O0 threads: dynamic elapsed: 0.102 user: 0.000 sys: 0.001
thread 1 terminated with signal: 'Segmentation fault'
failed: status = 143
--
./test29 -n 8
test: test29 opt: -O0 threads: dynamic elapsed: 0.103 user: 0.001 sys: 0.002
thread 0 terminated with signal: 'Segmentation fault'
failed: status = 143

These tests fail on an x86_64 system running FC18. We have seen this failure with GUPC on a recent version of SUSE. The fix we made was to no longer locate the initialization code into its own .upc_init linker section. This change was made in the following GUPC commit.

Author: nenadv
Date: Sat Oct 27 19:37:34 2012
New Revision: 192880

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192880 [^]
Log:
        Place shared initialization code into the .text
        section instead of a separate .upc_init section.
        * gcc/defaults.h (UPC_INIT_SECTION_NAME): Delete.
        (UPC_INIT_BEGIN_NAME): Delete.
        (UPC_INIT_END_NAME): Delete.
        * gcc/doc/tm.texi.in: Ditto.
        * gcc/doc/tm.texi: Ditto.
        * gcc/upc/upc-act.c (upc_build_init_func): Remove settings
        of the section for shared initialization code.
        * libgupc/config/default/upc-crt-config.h (UPC_INIT_SECTION_BEGIN):
        Delete.
        (UPC_INIT_SECTION_END): Delete.
        * libgupc/config/darwin/upc-crt-config.h: Ditto.
        * libgupc/upc-crtstuff.c: Remove declarations for .upc_init
        section start/end.
@ghost ghost assigned swatanabe Feb 28, 2013
@gary-funck gary-funck reopened this Mar 1, 2013
@gary-funck
Copy link
Author

make clang-test fails:

FAIL: Clang :: CodeGenUPC/init-shared-int.upc (2200 of 4612)
******************** TEST 'Clang :: CodeGenUPC/init-shared-int.upc' FAILED ****
****************
Script:
--
/eng/upc/dev/gary/clang/bld/bin/./clang -cc1 -internal-isystem /eng/upc/dev/gar
y/clang/bld/bin/../lib/clang/3.1/include /eng/upc/dev/gary/clang/src/llvm/tools
/clang/test/CodeGenUPC/init-shared-int.upc -emit-llvm -triple x86_64-pc-linux -
fupc-threads 4 -o - | FileCheck /eng/upc/dev/gary/clang/src/llvm/tools/clang/te
st/CodeGenUPC/init-shared-int.upc
--
Exit Code: 1
Command Output (stderr):
--
/eng/upc/dev/gary/clang/src/llvm/tools/clang/test/CodeGenUPC/init-shared-int.up
c:4:11: error: expected string not found in input
// CHECK: define internal void @__upc_global_var_init() nounwind section "upc_i
nit"
          ^
:1:1: note: scanning from here
; ModuleID = '/eng/upc/dev/gary/clang/src/llvm/tools/clang/test/CodeGenUPC/init
-shared-int.upc'
^
:14:1: note: possible intended match here
[...]

@gary-funck
Copy link
Author

Confirmed closed: passes the internal test suite and the separate clang upc test suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants