Re: diet 0.33 segfaults
Martin Castillo <[email protected]> Thu, 29 Mar 2018 03:40:47 +0200
| Newsgroups | gmane.linux.lib.dietlibc |
|---|---|
| Message-ID | <[email protected]> |
Hi,
> But some braindead distros change their gcc to always do
> -fstack-protector.
Seems like nix{os,} is braindead.
>
> That leads to the behavior we observe here.
>
> To counteract this, dietlibc's Makefile contains this:
>
> 593 # WANT_SSP
> 594 # This facepalm brought to you by: Ubuntu!
> 595 $(PICODIR)/stackgap.o: EXTRACFLAGS:=-fno-stack-protector
> 596 $(OBJDIR)/stackgap.o: EXTRACFLAGS:=-fno-stack-protector -fno-pie -DNDEBUG
>
> This was added early in version 0.33. You should not have seen this this
> behavior. Maybe your distro vendor decided to patch gcc so it ignores
> -fno-stack-protector. That would be really bad. If that is true, I see
> no way to fix it on my side.
That's exactly what happened. See [0]. That's from 2016. Money quote
(3rd comment):
"Not only that, but these flags are in the extraAfter section, which
means I can't even override the flags, for example with -Og in a
Makefile or build script."
>
> Please try the dietlibc version from CVS to see if that helps.
> If it does not, then you may have to file a bug with your Linux distro
> people.
>
Wasn't necessary, this magic line is a workaround:
export hardeningDisable=stackprotector
Thank you,
Martin
P.S.: Are there any sane distros?
[0]: https://github.com/NixOS/nixpkgs/issues/18995