Browse Source

* Modified test so recent Windows TLS changes do not break it (these changes cause threadvar Output to move from .bss to thread-local storage, and heaptrc no longer treats it as a valid pointer). Adding support for tls pointer checks to heaptrc could solve this, too (and would be fine anyway), but it is a separate issue. This test is about checking pointers from .data and .bss.

git-svn-id: trunk@18020 -
sergei 14 years ago
parent
commit
32c868d83e
1 changed files with 15 additions and 1 deletions
  1. 15 1
      tests/webtbs/tw3661.pp

+ 15 - 1
tests/webtbs/tw3661.pp

@@ -10,7 +10,21 @@ program project1;
 uses
   Classes;
 
+
+var
+  f: text;
 begin
  HaltOnNotReleased := true;
- writeln('abc');
+ { The subject matter of the test is heaptrc checking pointers belonging to .data
+   or .bss sections. However, using a standard io file for this purpose is not a good
+   idea, because it is a threadvar and resides in .bss only in certain circumstances
+   (FPC-specific threadvar model and multithreading not initialized).
+   Using a 'normal' file is fine. }
+ //writeln('abc');
+ 
+ assign(f,'tw3661.txt');
+ rewrite(f);
+ writeln(f,'abc');
+ close(f);
+ erase(f);
 end.