This is the mail archive of the
mailing list for the binutils project.
Re: windres regression with control strings spanning multiple lines
- From: Brian Dessent <brian at dessent dot net>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 17 Mar 2008 05:39:03 -0700
- Subject: Re: windres regression with control strings spanning multiple lines
- References: <47DBFCD8.9759A617@dessent.net> <47DE5E9F.firstname.lastname@example.org>
- Reply-to: binutils at sourceware dot org
Nick Clifton wrote:
> > The attached patch seems to fix the issue for me, allowing both the
> > testcase and a real app to build successfully.
> It would be really good if you could add a testcase to the binutils
> testsuite as well, so that we have a chance of catching problems like
> this in the future...
I had thought of that, the problem is I don't know what to include as
the expected result. That's why I tried the testcase with the Microsoft
resource compiler in the hopes that it would give a canonical result. I
also tried modifying the testcase to:
0 DIALOG 0,0,0,0
LTEXT "This is a "
LTEXT "This is a continued line",0,0,0,0,0
...and then comparing the output of windres with and without -DSPAN, but
they differ in what seems to be unrelated parts of the file header:
$ diff -u <(objdump -sj .rsrc tc-new.o | tail +5) \
<(objdump -sj .rsrc tc-new-span.o | tail +5)
--- /dev/fd/63 2006-11-30 16:00:00.000000000 -0800
+++ /dev/fd/62 2006-11-30 16:00:00.000000000 -0800
@@ -1,7 +1,7 @@
- 0000 00000000 db60de47 00000000 00000100 .....`.G........
- 0010 05000000 18000080 00000000 db60de47 .............`.G
+ 0000 00000000 af60de47 00000000 00000100 .....`.G........
+ 0010 05000000 18000080 00000000 af60de47 .............`.G
0020 00000000 00000100 00000000 30000080 ............0...
- 0030 00000000 db60de47 00000000 00000100 .....`.G........
+ 0030 00000000 af60de47 00000000 00000100 .....`.G........
0040 09040000 48000000 58000000 62000000 ....H...X...b...
0050 00000000 00000000 00008880 00000000 ................
0060 01000000 00000000 00000000 00000000 ................
I'm not sure what fields those bytes represent, and whether they matter
or are just coincidental uninitialized foo. I suppose the test could
ignore the first 0x40 bytes of the section if that makes the results
Of course the test could just test that the output matches the exact
output of what the current patched windres generates, but that seems
like a fragile test given the above instability.
Or it could simply test that a DIALOG containing a control whose text
contains pasted-string tokens does successfully compile without error,
without looking at the result. That would be better than nothing and
would at least identify some forms of regression.
What do you think? I can implement any of the above.