This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug malloc/19591] New: malloc does not work across a static dlopen boundary


https://sourceware.org/bugzilla/show_bug.cgi?id=19591

            Bug ID: 19591
           Summary: malloc does not work across a static dlopen boundary
           Product: glibc
           Version: 2.24
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: malloc
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
            Blocks: 19565
  Target Milestone: ---
             Flags: security-

Created attachment 8965
  --> https://sourceware.org/bugzilla/attachment.cgi?id=8965&action=edit
static-dlopen-malloc.c

The attached test case, when run with an LD_LIBRARY_PATH which includes
libc.so.6, shows that malloc inside a dlopen'ed DSO does not interoperate with
malloc in the statically-linked main program:

$ LD_LIBRARY_PATH=/lib64 ./static-dlopen-malloc
*** Error in `./static-dlopen-malloc': double free or corruption (out):
0x00007f1fc01a7bd0 ***
======= Backtrace: =========
[0x402299]
[0x4080f8]
[0x40aa2e]
[0x40c846]
[0x400923]
[0x401006]
[0x400cb9]
======= Memory map: ========
00400000-004be000 r-xp 00000000 08:01 1074842340                        
/home/fweimer/tmp/static-dlopen-malloc
006bd000-006c0000 rw-p 000bd000 08:01 1074842340                        
/home/fweimer/tmp/static-dlopen-malloc
006c0000-006c4000 rw-p 00000000 00:00 0 
01bf3000-01c16000 rw-p 00000000 00:00 0                                  [heap]
7f1fc01a3000-7f1fc02a4000 rw-p 00000000 00:00 0 
7f1fc02a4000-7f1fc02c5000 r-xp 00000000 08:01 1610619171                
/usr/lib64/ld-2.21.so
7f1fc02c5000-7f1fc04c4000 ---p 00021000 08:01 1610619171                
/usr/lib64/ld-2.21.so
7f1fc04c4000-7f1fc04c5000 r--p 00020000 08:01 1610619171                
/usr/lib64/ld-2.21.so
7f1fc04c5000-7f1fc04c6000 rw-p 00021000 08:01 1610619171                
/usr/lib64/ld-2.21.so
7f1fc04c6000-7f1fc04c7000 rw-p 00000000 00:00 0 
7f1fc04c7000-7f1fc067e000 r-xp 00000000 08:01 1611669442                
/usr/lib64/libc-2.21.so
7f1fc067e000-7f1fc087e000 ---p 001b7000 08:01 1611669442                
/usr/lib64/libc-2.21.so
7f1fc087e000-7f1fc0882000 r--p 001b7000 08:01 1611669442                
/usr/lib64/libc-2.21.so
7f1fc0882000-7f1fc0884000 rw-p 001bb000 08:01 1611669442                
/usr/lib64/libc-2.21.so
7f1fc0884000-7f1fc0888000 rw-p 00000000 00:00 0 
7ffc5993f000-7ffc59960000 rw-p 00000000 00:00 0                         
[stack]
7ffc599fa000-7ffc599fc000 r--p 00000000 00:00 0                          [vvar]
7ffc599fc000-7ffc599fe000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                 
[vsyscall]
Aborted (core dumped)


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=19565
[Bug 19565] Consolidate NSS name resolution interfaces
-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]