> I would think the generic -fstack-protector testcases would already pick
> this up.  But apparently there doesn't exist any testcase for it!  So
> this failure mode wasn't detected either.  Oh well.
>
> Not something I'll ask you to improve then!

Okay.
So if everything is good, can the changes be merged ?

Thanks
Ayappan

On Tue, Sep 2, 2025 at 3:17 PM Segher Boessenkool
<seg...@kernel.crashing.org> wrote:
>
> On Tue, Sep 02, 2025 at 03:01:27PM +0530, Ayappan wrote:
> > > Wow.  So this shortcoming harks back to the origin of time.
> > >
> > > Why was it not discovered before, do you think?  No one ever tried it?
> > >
> > > Should we have a testcase for it?  _Do_ we have a testcase for it?
> >
> > I came to know about this recently when working with a build failure
> > of Cpython in AIX. Recently in Cpython, the -fstack-protector flag is
> > added and a compile
> > check (-c) is added in configure to check whether it is accepted or
> > not. In AIX , it
> > passes during the compile check, and hence the flag is carried forward
> > further but during the
> > binary/library creation, it fails. If it would have failed during the
> > compile check (-c) only, then the
> > configure would have dropped the flag there only.
>
> Yeah, so arguably cpython is buggy here, too (it tests for something else
> than what it then uses: it tests if the commandline flag is reecognised
> at all, not if you can actually use it!)
>
> > # gcc -fstack-protector -c sample.c   --> passes
> > # gcc -fstack-protector sample.c
> > collect2: fatal error: library libssp_nonshared not found
> > compilation terminated.
> >
> > I am not sure whether we really need a testcase for this.
>
> I would think the generic -fstack-protector testcases would already pick
> this up.  But apparently there doesn't exist any testcase for it!  So
> this failure mode wasn't detected either.  Oh well.
>
> Not something I'll ask you to improve then!
>
>
> Segher

Reply via email to