This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PR19351, C++] Fix heap overflow in operator new[]

* Richard Guenther:

> I'd rather have you using something that expands to the saturating
> SS_PLUS and SS_MULT rtx codes - which means using fixed-point
> types and adjusting the middle-end to expand saturating operations
> with generic code sequences if the target does not provide them
> (with SSE they are for example available on x86_64).

Fixed-point support is broken for me, the <stdfix.h> lacks the proper
constants.  It seems to me that the types wouldn't offer sufficient
precision for this purpose; the scaling factor doesn't appear to be

The C fixed-point ABI is documented to be unstable.  It would have to
be set in stone along the process.  Using fixed-point arithmetic would
essentially require changing the C++ ABI on some architectures.  We
have better options if we want to go that route, but I don't think
this is acceptable for this kind of change.

(It's also somewhat unlikely that I'll be able to implement such
changes to the middle-end, let alone write new expanders for a wide
range of targets.)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]