When specifying CMAKE_BUILD_TYPE=Release the rexx image does not build on 
Tumbleweed. It receives a segmentation fault in MemorySegmentPool::newSegment().

This was an opportunity to look into how this image is built. This is what 
happens:

utilities/rexximage.cpp calls RexxCreateInterpreterImage() in 
api/InterpreterAPI.cpp
==> Interpreter::startInterpreter with SAVE_IMAGE_MODE in 
interpreter/runtime/Interpreter.cpp
==> calls memoryObject.initialize(mode == RUN_MODE) in 
interpreter/memory/RexxMemory.cpp
==> createImage() which is in interpreter/memory/Setup.cpp sets up 
==> interpreter/memory/RexxMemory.cpp MemoryObject::saveImage() saves the image 
to a file

When I debug ./rexximage it fails in above call. Compiler is gnu 6.1.1. With 
this working on other compilers and other platforms, it might be a compiler 
bug; on the other hand, structures might be bigger and we run out of space. 
Anyone seen this before?

Reading symbols from ./rexximage...done.
(gdb) run
Starting program: /home/rvjansen/workspace/workspace/build/bin/rexximage 
Missing separate debuginfos, use: zypper install 
glibc-debuginfo-2.23-4.12.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b5f517 in MemorySegmentPool::newSegment(unsigned long) ()
   from /home/rvjansen/workspace/workspace/build/bin/librexx.so.5.0.0
Missing separate debuginfos, use: zypper install 
libgcc_s1-debuginfo-6.1.1+r236988-1.6.x86_64 
libstdc++6-debuginfo-6.1.1+r236988-1.6.x86_64
(gdb) disassemble
Dump of assembler code for function _ZN17MemorySegmentPool10newSegmentEm:
   0x00007ffff7b5f4c0 <+0>:     push   %r13
   0x00007ffff7b5f4c2 <+2>:     push   %r12
   0x00007ffff7b5f4c4 <+4>:     lea    0xfff(%rsi),%r12
   0x00007ffff7b5f4cb <+11>:    push   %rbp
   0x00007ffff7b5f4cc <+12>:    push   %rbx
   0x00007ffff7b5f4cd <+13>:    mov    %rdi,%rbp
   0x00007ffff7b5f4d0 <+16>:    mov    %rsi,%r13
   0x00007ffff7b5f4d3 <+19>:    and    $0xfffffffffffff000,%r12
   0x00007ffff7b5f4da <+26>:    sub    $0x8,%rsp
   0x00007ffff7b5f4de <+30>:    jmp    0x7ffff7b5f517 
<_ZN17MemorySegmentPool10newSegmentEm+87>
   0x00007ffff7b5f4e0 <+32>:    mov    0x20(%rbp),%rdx
   0x00007ffff7b5f4e4 <+36>:    cmp    %rdx,%r12
   0x00007ffff7b5f4e7 <+39>:    jbe    0x7ffff7b5f540 
<_ZN17MemorySegmentPool10newSegmentEm+128>
   0x00007ffff7b5f4e9 <+41>:    mov    %r13,%rsi
   0x00007ffff7b5f4ec <+44>:    mov    $0x38,%edi
   0x00007ffff7b5f4f1 <+49>:    callq  0x7ffff7ab0530 
<_ZN17MemorySegmentPoolnwEmm@plt>
   0x00007ffff7b5f4f6 <+54>:    mov    %rax,%rdi
   0x00007ffff7b5f4f9 <+57>:    mov    %rax,%rbx
   0x00007ffff7b5f4fc <+60>:    callq  0x7ffff7ab33a0 
<_ZN17MemorySegmentPoolC1Ev@plt>
   0x00007ffff7b5f501 <+65>:    mov    0x2671b8(%rip),%rdi        # 
0x7ffff7dc66c0
   0x00007ffff7b5f508 <+72>:    mov    %rbx,0x0(%rbp)
   0x00007ffff7b5f50c <+76>:    mov    %rbx,%rsi
   0x00007ffff7b5f50f <+79>:    mov    %rbx,%rbp
   0x00007ffff7b5f512 <+82>:    callq  0x7ffff7ab7c10 
<_ZN12MemoryObject15memoryPoolAddedEP17MemorySegmentPool@plt>
=> 0x00007ffff7b5f517 <+87>:    mov    0x8(%rbp),%rax
   0x00007ffff7b5f51b <+91>:    test   %rax,%rax
   0x00007ffff7b5f51e <+94>:    je     0x7ffff7b5f4e0 
<_ZN17MemorySegmentPool10newSegmentEm+32>
   0x00007ffff7b5f520 <+96>:    cmp    (%rax),%r13
   0x00007ffff7b5f523 <+99>:    ja     0x7ffff7b5f4e0 
<_ZN17MemorySegmentPool10newSegmentEm+32>
   0x00007ffff7b5f525 <+101>:   movq   $0x0,0x8(%rbp)
   0x00007ffff7b5f52d <+109>:   add    $0x8,%rsp
   0x00007ffff7b5f531 <+113>:   pop    %rbx
   0x00007ffff7b5f532 <+114>:   pop    %rbp
   0x00007ffff7b5f533 <+115>:   pop    %r12
   0x00007ffff7b5f535 <+117>:   pop    %r13
   0x00007ffff7b5f537 <+119>:   retq   
   0x00007ffff7b5f538 <+120>:   nopl   0x0(%rax,%rax,1)
   0x00007ffff7b5f540 <+128>:   mov    0x10(%rbp),%rax

I set the OpenSUSE build back to non-optimizing.

best regards,

René.
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to