This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Fix PrologEpilogInserter to avoid duplicate allocation of SEH structs
ClosedPublic

Authored by etienneb on Jun 9 2016, 10:29 AM.

Details

Summary

When stack-protection is activated and WinEH exceptions is used,
the EHRegNode (exception handling registration) is allocated twice on the stack.

This was not breaking anything except loosing space on the stack.

D:\src\llvm\examples>llc exc2.ll  -debug-only=pei
alloc FI(0) at SP[-24]
alloc FI(1) at SP[-48]   <<-- Allocated
alloc FI(1) at SP[-72]   <<-- Allocated twice!?
alloc FI(2) at SP[-76]
alloc FI(4) at SP[-80]
alloc FI(3) at SP[-84]

Diff Detail

Event Timeline

etienneb updated this revision to Diff 60195.Jun 9 2016, 10:29 AM
etienneb retitled this revision from to [CodeGen] Fix PrologEpilogInserter to avoid duplicate allocation of SEH structs.
etienneb updated this object.
etienneb added a reviewer: rnk.
etienneb added a subscriber: llvm-commits.
majnemer accepted this revision.Jun 10 2016, 12:28 PM
majnemer edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 10 2016, 12:28 PM
etienneb closed this revision.Jun 10 2016, 1:31 PM