This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: windres regression with control strings spanning multiple lines


Hi Brian,

> > > 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
> BEGIN
> #ifdef SPAN
>     LTEXT "This is a "
>               "continued line",0,0,0,0,0
> #else
>     LTEXT "This is a continued line",0,0,0,0,0
> #endif
> END
> 
> ...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
> stable.

These are timestamps, so this variant won't work.

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

Regards,
 i.A. Kai Tietz

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-StraÃe 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  KomplementÃrin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-StraÃe 9 â 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - GeschÃftsfÃhrer: 
Ulrike DÃhler, Manuela Kluger


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]