Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2021-05

Odd test failure on x86_64-win64

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

J. Gareth Moreton

Hi everyone,

So I stumbled across this during my optimisation development:

Under x86_64-win64 (I'm not sure about other platforms), the test "test/tarray15.pp" fails with exitcode 19 if you run the test suite with TEST_OPT=-a to create assembly dumps.  The failure is because the code attempts to write to a constant but doesn't raise an exception while doing so.  Can anyone else confirm this?

Gareth aka. Kit

This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

Reply by email

Pierre Muller
to J. Gareth Moreton

Please look at:

https://www.freepascal.org/testsuite/cgi-bin/new-testsuite2.cgi?action=4&testfileid=5630

.rdata support, i.e. read-only data sections,
is not supported in several CPU-OS combination,
and IIRC, it is even worse for PIC code,
but I don't really know if these special limitations should not be removed...

See TGNUAssembler.sectionname method in compiler/aggas.pas unit, and difference between secnames and secnames_pic inside that method.

Pierre

Le 12/05/2021 à 20:13, J. Gareth Moreton via fpc-devel a écrit :

Show quoted text 13 lines
Hi everyone, So I stumbled across this during my optimisation development: Under x86_64-win64 (I'm not sure about other platforms), the test "test/tarray15.pp" fails with exitcode 19 if you run the test suite with TEST_OPT=-a to create assembly dumps.  The failure is because the code attempts to write to a constant but doesn't raise an exception while doing so.  Can anyone else confirm this? Gareth aka. Kit

Reply by email

J. Gareth Moreton
to Pierre Muller

It just seemed odd to me that switching to the external assembler (due to -a) causes the section to be read/write, while the internal assembler can handle it.  That might be a limitation with the external assembler though.

Gareth aka. Kit

Pierre Muller wrote 37 lines
Please look at: https://www.freepascal.org/testsuite/cgi-bin/new-testsuite2.cgi?action=4&testfileid=5630 .rdata support, i.e. read-only data sections, is not supported in several CPU-OS combination, and  IIRC, it is even worse for PIC code, but I don't really know if these special limitations should not be removed... See TGNUAssembler.sectionname method in compiler/aggas.pas unit, and difference between secnames and secnames_pic inside that method. Pierre Le 12/05/2021 à 20:13, J. Gareth Moreton via fpc-devel a écrit : > Hi everyone, > > So I stumbled across this during my optimisation development: > > Under x86_64-win64 (I'm not sure about other platforms), the test > "test/tarray15.pp" fails with exitcode 19 if you run the test suite with > TEST_OPT=-a to create assembly dumps.  The failure is because the code > attempts to write to a constant but doesn't raise an exception while > doing so.  Can anyone else confirm this? > > Gareth aka. Kit > > _______________________________________________ fpc-devel maillist  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

Reply by email