This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: _FORTIFY_SOURCE for std::vector


On 06/01/2012 01:42 PM, Paolo Carlini wrote:
Hi

a bunch of minor comments, first:
1- What happens with make check-debug? I suppose the debug-mode checks
trigger before the check in normal code, and the testcase doesn't pass.
Maybe for this kind of work you need a // { dg-require-normal-mode "" }

I'm now running "make check-debug", didn't know about it.


2- Something sound weird with debug-mode which doesn't throw, just
errors out, and the new check in normal-mode which throws. If there are
other reasons to not throw, per Jakub's comment, I would support the idea.

Yes, that's true.


2- Make sure to have the test variable in the testcases.

I've seen the variable, but I don't understand how to use it. I would like to add something about it to the testing documentation.


3- We definitely need a comment explaining *who* provided _M_range_check

Sorry, I don't understand this suggestion.


4- Maybe I'm misremembering, sorry in case, but Isn't:

#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0

the same as:

#if _FORTIFY_SOURCE > 0

?

I think you're right, but I'm just copying literally what GNU libc is doing. I can change it to the shorter version if you want me to.



-- Florian Weimer / Red Hat Product Security Team


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