View Issue Details

IDProjectCategoryView StatusLast Update
0031212FPCRTLpublic2017-03-15 19:06
ReporterCarlos ClicioAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformIntelOSLinux 64bitsOS VersionDebian 7
Product Version2.6.4Product Buildalso in 3.0 
Target Version3.2.0Fixed in Version3.1.1 
Summary0031212: AnsiDeQuotedStr generate exception with empty string .
DescriptionWhen 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 Reproduceuses 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
TagsNo tags attached.
Fixed in Revision35598
FPCOldBugId
FPCTarget
Attached Files

Activities

Thaddy de Koning

2017-01-11 15:06

reporter   ~0097416

Last edited: 2017-01-11 15:10

View 3 revisions

Please don't report on very old and unsupported versions like 2.6.4.
This bug has been fixed some time ago. I tested it with fixes and trunk.

Bart Broersma

2017-01-11 15:12

reporter   ~0097417

He did mention it was te same in 3.0.0 (in field "Product Build", but he should have put 3.0.0 in "Product Version").

Thaddy de Koning

2017-01-11 15:12

reporter   ~0097418

Last edited: 2017-01-11 15:14

View 2 revisions

As an aside:
A small addition to the web interface can warn users that they are reporting on old versions. That can still be relevant of course, but better to stimulate the user to test on a supported version first.
@Bart: can you confirm it for the RC? I can't under linux debian.

Bart Broersma

2017-01-12 15:54

reporter   ~0097437

> @Bart: can you confirm it for the RC? I can't under linux debian.
I don't have a 64-bit Linux available to me.

Dmitriy Pomerantsev

2017-01-12 19:21

reporter   ~0097442

I have. I ran this program with fpc 3.1.1 builded from commit #3a9177a. No any exceptions. Just a new line in output.

Bart Broersma

2017-01-13 13:59

reporter   ~0097447

Is the issue present in the 3.0.2RC1 version?

Michael Van Canneyt

2017-03-15 19:06

administrator   ~0098933

I've added an explicit check for Nil in AnsiExtractDequotedString.
The TypeCast in AnsiDequotedString does seem fishy, though.

Issue History

Date Modified Username Field Change
2017-01-10 19:00 Carlos Clicio New Issue
2017-01-11 15:06 Thaddy de Koning Note Added: 0097416
2017-01-11 15:06 Thaddy de Koning Note Edited: 0097416 View Revisions
2017-01-11 15:10 Thaddy de Koning Note Edited: 0097416 View Revisions
2017-01-11 15:12 Bart Broersma Note Added: 0097417
2017-01-11 15:12 Thaddy de Koning Note Added: 0097418
2017-01-11 15:14 Thaddy de Koning Note Edited: 0097418 View Revisions
2017-01-12 15:54 Bart Broersma Note Added: 0097437
2017-01-12 19:21 Dmitriy Pomerantsev Note Added: 0097442
2017-01-13 13:59 Bart Broersma Note Added: 0097447
2017-03-15 19:06 Michael Van Canneyt Fixed in Revision => 35598
2017-03-15 19:06 Michael Van Canneyt Note Added: 0098933
2017-03-15 19:06 Michael Van Canneyt Status new => resolved
2017-03-15 19:06 Michael Van Canneyt Fixed in Version => 3.1.1
2017-03-15 19:06 Michael Van Canneyt Resolution open => fixed
2017-03-15 19:06 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-03-15 19:06 Michael Van Canneyt Target Version => 3.2.0