[llvm-dev] Beginner question: extending pointer to 128 bits segfaults

Barbora Murinová via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 15 17:23:52 PST 2018


Hi all,

I've been trying to extend pointer size of the X86 target to 128 bits. For
the prortype, I would like nothing more than the pointers being i128 type
with the same value as before. All I've done was changing the data layout
string to p:128:128 and when trying to run a basic program such as:

int a = 42;
int *p = &a;

it segfaults with the following stack trace:

#0 0x00000000013eff7a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/afs/
inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/Support/Unix/Signals.inc:402:0
#1 0x00000000013ee20e llvm::sys::RunSignalHandlers() /afs/
inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/Support/Signals.cpp:50:0
#2 0x00000000013ee34a SignalHandler(int) /afs/
inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/Support/Unix/Signals.inc:242:0
#3 0x00007fad6b434370 __restore_rt (/lib64/libpthread.so.0+0xf370)
#4 0x0000000001ba1734
llvm::DAGTypeLegalizer::PromoteIntOp_ATOMIC_STORE(llvm::AtomicSDNode*)
/afs/
inf.ed.ac.uk/user/s14/s1455152/Documents/HP/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:1025:0
Stack dump:
0.      Program arguments: /afs/
inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build/bin/clang-6.0 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj
-mrelax-all -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name simple.c -mrelocation-model static -mthread-model posix
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info
-debugger-tuning=gdb -resource-dir /afs/
inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build/lib/clang/6.0.0
-internal-isystem /usr/local/include
-internal-isystem /afs/
inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build/lib/clang/6.0.0/include
-internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdebug-compilation-dir /afs/
inf.ed.ac.uk/user/s14/s1455152/Documents/HP/build -ferror-limit 19
-fmessage-length
159 -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/simple-2837aa.o -x c ../copy/simple.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '../copy/simple.c'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@main'
clang-6.0: error: unable to execute command: Segmentation fault
clang-6.0: error: clang frontend command failed due to signal (use -v to
see invocation)

Now I know almost nothing about LLVM, but I assumed that since X86 target
has SSE extensions, it wouldn't have a problem with a 128-bit value type in
general. I would really appreciate any explanations and pointers you can
give me. Sorry for such a general question.

Best wishes,
Barbora

-- 
----------------
Barbora Murinová
The University of Edinburgh
SK: +421905718390
UK: +447477833795
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180116/7f7fef34/attachment.html>


More information about the llvm-dev mailing list