[llvm] r229352 - IR: Properly return nullptr when getAggregateElement is out-of-bounds

David Majnemer david.majnemer at gmail.com
Mon Mar 16 09:14:29 PDT 2015


On Mon, Mar 16, 2015 at 7:46 AM, Tom Stellard <tom at stellard.net> wrote:

> On Mon, Mar 16, 2015 at 07:40:19AM -0700, David Majnemer wrote:
> > I'm pretty sure these two functions aren't virtual.
> >
>
> OK, does that mean adding them anywhere will break the ABI or does it mean
> they
> are safe to add?
>

I think it's safe to add.


>
> -Tom
>
> > On Monday, March 16, 2015, Tom Stellard <tom at stellard.net> wrote:
> >
> > > On Sat, Mar 14, 2015 at 02:52:25PM +0100, Björn Steinbrink wrote:
> > > > Hi Tom, Hi David,
> > > >
> > > > On 2015.02.16 04:02:10 -0000, David Majnemer wrote:
> > > > > Author: majnemer
> > > > > Date: Sun Feb 15 22:02:09 2015
> > > > > New Revision: 229352
> > > > >
> > > > > URL: http://llvm.org/viewvc/llvm-project?rev=229352&view=rev
> > > > > Log:
> > > > > IR: Properly return nullptr when getAggregateElement is
> out-of-bounds
> > > > >
> > > > > We didn't properly handle the out-of-bounds case for
> > > > > ConstantAggregateZero and UndefValue.  This would manifest as a
> crash
> > > > > when the constant folder was asked to fold a load of a constant
> global
> > > > > whose struct type has no operands.
> > > > >
> > > > > This fixes PR22595.
> > > >
> > > > Could this be added to 3.5.2?
> > > >
> > >
> > > This adds a new function to two difference classes, which can
> > > break the ABI in some cases.  According to abi-compliance-checker:
> > >
> > >
> > > "You can add virtual functions at end of leaf classes with exported
> > >  constructors."
> > >
> > > I have a buildbot setup to check abi compliance, so if you move these
> > > functions to the end of the classes, I will approve merging it, but if
> > > this is not enough to ensure ABI compliance, I will revert it before
> the
> > > release.
> > >
> > > -Tom
> > >
> > > > Cheers
> > > > Björn
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150316/d33d4130/attachment.html>


More information about the llvm-commits mailing list