This is an archive of the discontinued LLVM Phabricator instance.

[RuntimeDyld] Fixed buffer overflows with absolute symbols
ClosedPublic

Authored by MoritzS on Jan 28 2021, 1:03 AM.

Diff Detail

Event Timeline

MoritzS created this revision.Jan 28 2021, 1:03 AM
MoritzS requested review of this revision.Jan 28 2021, 1:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2021, 1:03 AM
lhames accepted this revision.Apr 26 2021, 10:02 AM

LGTM.

Out of interest, how did you find this? If there's a nice test case that reproduces the overflows we could include it in the regression suite.

This revision is now accepted and ready to land.Apr 26 2021, 10:02 AM
This revision was landed with ongoing or failed builds.Apr 26 2021, 10:24 AM
This revision was automatically updated to reflect the committed changes.

Thanks!

As part of a research project on a code-generating database system I am using LLVM to generate code and also link it with static libraries at runtime. I found a few bugs in RuntimeDyld most of which I submitted for a review. The biggest change that I haven't submitted yet is my implementation of TLS relocations (only for x86 for now) in RuntimeDyld. I know that long-term this will probably be replaced by JITLink but when I started working on that project, it didn't seem stable enough so I decided to extend RuntimeDyld.