Opened 13 years ago

Closed 12 years ago

#192 closed bug (fixed)

Segmentfault on 64bit system in omalloc

Reported by: krueger Owned by: hannes
Priority: major Milestone: 3-1-1
Component: omalloc Version: 3-1-0
Keywords: Cc:


When compiling omalloc with -DNDEBUG on an x86_64 system (gcc 4.3.2), Singular crashes with Segment fault/Bus:

On an 32bit system it works!

omFreeSizeToSystem (addr=0x7ffff7f4e088, size=8) at /home/soft/Singular/src/kai/Singular_cmake/omalloc/omAllocSystem.c:294                                
294     {                                                                                                                                                 
295       OM_FREE_TO_SYSTEM( addr );                                                                                                                      
*** glibc detected *** /home/soft/Singular/src/kai/Singular_cmake/build_release/Singular/Singular-static: munmap_chunk(): invalid pointer: 0x00007ffff7f4e088 ***

Change History (2)

comment:1 Changed 13 years ago by krueger

Additional test: compiling the full package on:

 opensuse11, 64bit:  -O3 -DNDEBUG works
 fc10, 32bit         -O3 -DNDEBUG works
 fc10, 64bit        -O3 -DNDEBUG segfault
 fc10, 64bit        -O3          works

comment:2 Changed 12 years ago by hannes

Resolution: fixed
Status: newclosed

seems to miss the needed defines(configure error): on 64bit machines omalloc.h needs:

#define OM_T_FREE1
#define OM_T_FREE3
#define OM_T_STR
#define OM_T_ALLOC
#define OM_T_REALLOC

depending on SIZEOF_LONG being 8

Note: See TracTickets for help on using tickets.