by dikaiosune · 10y ago · 0 comments
Tongue-in-cheek, it's very exciting that distros will now have an easier time patching Rust and producing bugs like this one:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/25679...
#include <stdio.h>
int main (void)
{
signed char one = 1;
unsigned char coerced_to_positive_255 = -1;
printf ("%d\n", one > coerced_to_positive_255);
return 0;
}In the last comment [1] on the bug, it's mentioned the release in which the fix was released. From its page [2] you can see all the details of it, including its diffs.
[1] https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/25679...
[2] https://launchpad.net/ubuntu/+source/gcc-4.2/4.2.4-1ubuntu3
+ * Fixes included in the 4.2.4 upstream release (compared to 4.2.3-3ubuntu7):
+ - Fix LP: #256797, wrong-code on ia32, taken from the gcc-4_2-branch.
Which makes it sound like the problem was in GCC, not the Ubuntu package. I was under the impression that the bug was caused by an Ubuntu-specific patch, from dikaiosune's comment. Am I missing something?Edit: Ah, so the fix was added in 4.2.4-1ubuntu1, not 4.2.4-1ubuntu3. Which narrows the actual source changes to something inside this other 500KB patch[1]. From here I looked at the upstream changes using GitHub compare[2] (warning, big page). I ran a one liner in the JS console to expand all the "…" buttons next to the commit messages so I could search for relevant text, which lead me to this commit[3], which seems to be the actual code changes to fix that particular bug. That finally lead me to the bug in GCC's bug tracker[4].
I don't know if I have just been very lucky with the open source projects I've collaborated with, but this journey to find where a bug was actually fixed seems completely insane to me. Is all this info passed down from maintainer to maintainer just via folklore? Crazy.
Oh, I almost forgot about what I actually wanted to know. This looks like a GCC bug that wasn't caused by Ubuntu specific patches, so I don't know what dikaiosune wanted to say.
[0] https://launchpadlibrarian.net/18364478/gcc-4.2_4.2.4-1ubunt...
[1] https://launchpadlibrarian.net/17472542/gcc-4.2_4.2.3-2ubunt...
[2] https://github.com/gcc-mirror/gcc/compare/gcc-4_2_3-release....
[3] https://github.com/gcc-mirror/gcc/commit/80cacf54c3d410d5552...