Hi,

Sébastien Bernard:
> result from strcmp('\0000','\0001' is 0)
> result from strcmp('\0000','\0001' is -1)
> Typicaly, an endianness error.

But one in strcmp(), not in your code or the one of genisoimage.
You compare an empty string with a string that contains one
character 0x01.
This is under no endianness allowed to strcmp() == 0.

Endianness would only be of interest if you compare characters
of more than one byte each. (I.e. sizeof(char) == 2)
But that would be quite an odd environment for a C program.
char is neither guaranteed to be signed nor to be 8 bit.
Nevertheless programs would break in large numbers if that
assumption was not fulfilled.


> -    if (strcmp(rpnt, lpnt) == 0) {
> +    if (strcmp(rpnt, lpnt) == 0 && rpnt[0] == lpnt[0]) {

Are you sure that it does not miscompare other strings too ?


> I think that genisoimage with that test is
> unable to generated any iso at all on big endian machines.

I cannot agree with this diagnosis.
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.


> 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.


Steve McIntyre:
> We build all the release images on an amd64 machine, pettersson.d.o

Ok. That explains why there are sparc-bootable ISOs from xorriso.



Have a nice day :)

Thomas


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/21777670788974871...@scdbackup.webframe.org

Reply via email to