Page MenuHomePhabricator

Cast the fifth arg to mremap to void *
ClosedPublic

Authored by hjl.tools on Feb 2 2016, 7:44 AM.

Details

Summary

Since the prototype of mremap is

void *mremap(void *old_address, size_t old_size, size_t new_size,
	     int flags, ... /* void *new_address*/);

we need to cast new_address to void * when calling mremap. Otherwise,
the wrong value will be passed to mremap on x32.

Diff Detail

Event Timeline

hjl.tools updated this revision to Diff 46653.Feb 2 2016, 7:44 AM
hjl.tools retitled this revision from to Cast the fifth arg to mremap to void * .
hjl.tools updated this object.
hjl.tools added reviewers: kcc, eugenis.
hjl.tools added a subscriber: llvm-commits.
samsonov accepted this revision.Feb 2 2016, 9:56 AM
samsonov added a reviewer: samsonov.
samsonov added a subscriber: samsonov.

LGTM

This revision is now accepted and ready to land.Feb 2 2016, 9:56 AM

Please check it in for me. Thanks.

This revision was automatically updated to reflect the committed changes.