pkgsi686Linux.gdb: fix formatting for 32-bit systems#173844
pkgsi686Linux.gdb: fix formatting for 32-bit systems#173844vcunat merged 1 commit intoNixOS:staging-nextfrom
Conversation
|
I hope it at least won't crash when reaching those prints. |
|
Yeah, looking at the affected format strings at https://sourceware.org/pipermail/gdb-patches/2022-May/189288.html they only attempt to print digits and don't chase any pointers. That should only print garbage values. |
|
The disable-werror is really nice, but won't this cause a large number of rebuilds while we're trying to cut a release? Could also target staging with that, maybe. Not sure what's best though. (ca-derivations when? 😜) |
|
I dunno. |
|
A few rare targets don't have clean format strings on 32-bit systems: NixOS#171216 (comment) /build/gdb-12.1/_build/sim/../../sim/cris/sim-if.c:575:28: error: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'bfd_size_type' {aka 'long long unsigned int'} [-Werror=format=] We pull in patch pending upstream inclusion.
bfaf2e4 to
63d81dd
Compare
Sounds good. Retargeted against
I wrote the patch after the formatting hack and was not sure when it gets accepted upstream. I added the patch to nixpkgs repository and applied it conditionally. |
|
OK, so looking at the gdb diff, the main thing is length check by the compiler :-) so as the build now passes on both x86 linuxes, I believe the lengths are correct now. (On those platforms at least, but I don't expect variability in these sizes among platforms of the same pointer length.) |
A few rare targets don't have clean format strings on 32-bit systems:
#171216 (comment)
Let's disable format hardening on 32-bit systems until it's fixed upstream.
While at it disabled -Werror to avoid failures on newer and exotic
toolchain versions.
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes