AnsiDeQuotedStr generate exception with empty string .
Original Reporter info from Mantis: clicio
-
Reporter name: Carlos Clicio
Original Reporter info from Mantis: clicio
- Reporter name: Carlos Clicio
Description:
When pass a variable with empty string to AnsiDeQuotedStr the program abort with access violation as shown bellow.
It happens with 64bits compiler version, if i compile the same program with fpc 32bits works fine
Steps to reproduce:
uses sysutils;
var
s : ansistring;
begin
s:= '';
writeln(AnsiDeQuotedStr(s,'"'));
end.
Compile with FPC 64bits , and run :
clicio@i-linux:~$ fpc tst
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
.clicio@i-linux:~$ ./tst
An unhandled exception occurred at $00000000004374E4:
EAccessViolation: Access violation
$00000000004374E4
clicio@i-linux:~$ file /usr/bin/fpc
/usr/bin/fpc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 2.4.0, stripped
With 32bits works fine
Mantis conversion info:
- Mantis ID: 31212
- OS: Linux 64bits
- OS Build: Debian 7
- Build: also in 3.0
- Platform: Intel
- Version: 2.6.4
- Fixed in version: 3.1.1
- Fixed in revision: 35598 (#0ee31963)
- Target version: 3.2.0