This is an archive of the discontinued LLVM Phabricator instance.

Fix segfault caused by the "libstdc++ eager exception spec hack"
Needs ReviewPublic

Authored by bmoody on Aug 7 2019, 5:30 PM.

Details

Reviewers
rsmith
Summary

Segfault occurs when the hack is applied to a function decl containing
an unparsed default argument. Parser::HandleMemberFunctionDeclDelays
was assuming that if a decl contains an unparsed default arg then it
must also have an unparsed exception spec. This causes a
read-from-wrong-union-member on FunctionTypeInfo::ExceptionSpecTokens,
triggering a segfault later on when the pointer is used.

Diff Detail

Event Timeline

bmoody created this revision.Aug 7 2019, 5:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2019, 5:30 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript