Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002389graphvizBuild/Installpublic2013-11-01 15:592013-11-06 12:46
Reporterryandesign 
Assigned Toellson 
PrioritynormalSeverityminorReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0002389: graphviz uses a fuzzy check whether alloca(3) uses malloc(3), which fails in some cases
DescriptionI have been asked to submit this bug report to you, on behalf of a fellow MacPorts developer.

-------------

Graphviz uses a check in `lib/vmalloc/features/vmalloc` that is supposed to find out whether `alloca(3)` is internally using `malloc(3)`. To do this, this check provides a custom implementation of `malloc(3)` and assumes that if this implementation is going to be called it was called by `alloca(3)`.

However, this assumption doesn't hold in all cases, e.g. it breaks when having `DYLD_INSERT_LIBRARIES` is set, as is the case for [MacPorts'] trace mode, because the Mac OS loader `dyld` internally calls `malloc(3)`, causing the check to fail.

The check should instead use a global volatile variable to check whether the current call to `malloc(3)` happened while trying to use `alloca(3)`. The overriden `malloc(3)` should behave like the standard one in all other cases.

The attached patch fixes this. Additional checks for `dlsym(3)` and `dlfcn.h` might be required.
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSION2.34.0
Attached Filesdiff file icon patch-lib__vmalloc__features__vmalloc-dyld-uses-malloc.diff [^] (628 bytes) 2013-11-01 15:59 [Show Content]

- Relationships

-  Notes
User avatar (0000594)
ellson (administrator)
2013-11-01 16:23

Patch applied. Thank you.
User avatar (0000598)
erg (administrator)
2013-11-06 12:46

John added the patches, and erg tweaked the vmalloc file to make sure dflcn.h exists.

- Issue History
Date Modified Username Field Change
2013-11-01 15:59 ryandesign New Issue
2013-11-01 15:59 ryandesign File Added: patch-lib__vmalloc__features__vmalloc-dyld-uses-malloc.diff
2013-11-01 16:23 ellson Note Added: 0000594
2013-11-06 12:46 erg Note Added: 0000598
2013-11-06 12:46 erg Assigned To => ellson
2013-11-06 12:46 erg Status new => resolved
2013-11-06 12:46 erg Resolution open => fixed


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker