Le 28/04/2014 14:15, Thomas Schmitt a écrit :Ok, you are correct.
Hi,
Sébastien Bernard:
result from strcmp('\0000','\0001' is 0)But one in strcmp(), not in your code or the one of genisoimage.
result from strcmp('\0000','\0001' is -1)
Typicaly, an endianness error.
You compare an empty string with a string that contains one
character 0x01.
This is under no endianness allowed to strcmp() == 0.
strcmp yields a bad result. I wasn't sure strcmp was doing byte comparaison.
However, memcmp function is ok.Basically, the fix is just to check, in case of strcmp() == 0 that the first byte of each string is the same.
- if (strcmp(rpnt, lpnt) == 0) {Are you sure that it does not miscompare other strings too ?
+ if (strcmp(rpnt, lpnt) == 0 && rpnt[0] == lpnt[0]) {
It's should be redundant operation if strcmp == 0 but not in the case of strcmp is misbehaving.
It's just a workaround. The correct fix is, of course, to fix the strcmp.
Another workaround would be to use :+ if (memcmp(rpnt, lpnt,MAX_ISONAME+1) == 0) {
- if (strcmp(rpnt, lpnt) == 0) {Indeed, the correct fix is using strcmp. Meanwhile, the package is broken.
I think that genisoimage with that test isI cannot agree with this diagnosis.
unable to generated any iso at all on big endian machines.
Not having a big-endian machine at hand now, i can confirm from
my old SunOS-4-on-SPARC days that strcmp() is supposed to yield
a non-zero result with your example char arrays.
strcmp() may well be implemented by word comparisons. But then it
is the duty of the implementation to properly handle the ends of
the strings even if those are not word aligned.
Hum, still no answer. I'm going to fill it again.
I filed a bug with xorriso. Waiting for the number to show up.I will hopefully get a notification via the pkg-libburnia-devel
list. Else i will bother you.
I didn't imagine it could be doable.
Steve McIntyre:
We build all the release images on an amd64 machine, pettersson.d.oOk. That explains why there are sparc-bootable ISOs from xorriso.
Thanks for your time and dedication.
Have a nice day :)
Thomas
SebArchive: [🔎] 535E54EE.6050205@nerim.net" target="_blank">https://lists.debian.org/[🔎] 535E54EE.6050205@nerim.net
--
To UNSUBSCRIBE, email to debian-sparc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org