Discussion:
[fpc-devel] Odd test failure on x86_64-win64
J. Gareth Moreton via fpc-devel
2021-05-12 18:13:25 UTC
Permalink
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

_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/
Pierre Muller via fpc-devel
2021-05-12 21:22:38 UTC
Permalink
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
Post by J. Gareth Moreton via fpc-devel
Hi everyone,
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 - fpc-***@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-
J. Gareth Moreton via fpc-devel
2021-05-12 21:27:27 UTC
Permalink
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
Post by Pierre Muller via fpc-devel
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
Post by J. Gareth Moreton via fpc-devel
Hi everyone,
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
_______________________________________________
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

_______________________________________________
fpc-devel maillist - fpc-***@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-d
Continue reading on narkive:
Loading...