Bug 224 - Malloc_Test seg faults on LynxOS
Summary: Malloc_Test seg faults on LynxOS
Status: RESOLVED
Alias: None
Product: ACE
Classification: Unclassified
Component: ACE Tests (show other bugs)
Version: 5.0
Hardware: All All
: P2 normal
Assignee: Douglas C. Schmidt
URL:
Depends on:
Blocks:
 
Reported: 1999-08-10 10:25 CDT by levine
Modified: 1999-10-13 10:15 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description levine 1999-08-10 10:25:46 CDT
Malloc_Test seg faults here on LynxOS, both x86 and PPC:

#0  0x1f97 in ACE_Malloc<ACE_MMAP_Memory_Pool, ACE_MMAP_Memory_Pool_Options,
ACE_Process_Mutex>::shared_malloc ()
#1  0x2162 in ACE_Malloc<ACE_MMAP_Memory_Pool, ACE_MMAP_Memory_Pool_Options,
ACE_Process_Mutex>::malloc ()
#2  0x4b1 in initialize ()
Comment 1 levine 1999-08-10 14:23:59 CDT
The SEGV happens:

    at /project/danzontmp/levine/ACE_wrappers/build/lynx/ace/Malloc_T.cpp:316
316           if (currp->s_.size_ >= nunits) // Big enough

currp appears to have a bogus value:

(gdb) p currp
$4 = (ACE_Malloc_Header *) 0xf68990c3
(gdb) p *currp
Cannot access memory at address 0xf68990c3.
Comment 2 levine 1999-08-11 11:52:59 CDT
From Doug:
        That's weird!  The only thing I can think of is that maybe
LynxOS doesn't like this address in the child:

static const void *CHILD_BASE_ADDR =
#if defined (ACE_HAS_POSITION_INDEPENDENT_MALLOC)
       64 * 1024 +
#endif /* ACE_HAS_POSITION_INDEPENDENT_MALLOC */
       ACE_DEFAULT_BASE_ADDR;

Can you please let me know if the segfault is occurring in the child
or in the parent?  If it's in the parent, then I'm at a loss.  If it's
in the child, then we can probably pick a better base address, which
should make LynxOS happy.
Comment 3 levine 1999-08-11 12:00:59 CDT
The segfault is in the parent.

ACE_DEFAULT_BASE_ADDR is 0 on LynxOS.  That tells the
OS to pick the address.  It works well best other tests.
ACE_MAP_FIXED is 0, as well.
Comment 4 Douglas C. Schmidt 1999-08-27 18:30:59 CDT
I recommend that we don't enable ACE_HAS_POSITION_INDEPENDENT_MALLOC with
Lynx.
Comment 5 levine 1999-08-27 19:31:59 CDT
As far as I can tell, we don't enable ACE_HAS_POSITION_INDEPENDENT_MALLOC
on LynxOS.
Comment 6 Douglas C. Schmidt 1999-10-06 08:43:59 CDT
It's not clear why this fails, so for now, I've commented out the test on
LynxOS
Comment 7 levine 1999-10-13 10:15:59 CDT
Fixed the disabling of the test on LynxOS:
ChangeLogTag: Wed Oct 13 10:11:47 1999  David L. Levine  <levine@cs.wustl.edu>