Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Medium
New issue 368 by [email protected]: kMaxNumberOfAddressRanges can be
too small on OS X when loading code at runtime with NSLinkModule
https://code.google.com/p/address-sanitizer/issues/detail?id=368
When sanitizers are creating a list of loaded modules and their address
ranges, we have a limit of ranges per module in sanitizer_common.h:
static const uptr kMaxNumberOfAddressRanges = 6;
and when we reach this limit, we crash. On OS X, there is a NSLinkModule
API that can be used to dynamically add a module in runtime, and since such
a module is not backed by a file on disk, you can specify the name of this
module. If you specify the same name for several modules, it is treated by
the sanitizer memory mapper as a single module, and you can then reach the
limit.
Although NSLinkModule and associated APIs are deprecated, they are still
being used by other code, namely by OpenCL to compile and load OpenCL image
kernels at runtime.
Attaching a test case to reproduce this.
Attachments:
nslinkmodule.mm 1.1 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.