View Single Post
Old 26 June 2018, 16:48   #93
selco
Registered User
 
Join Date: Aug 2013
Location: Germany
Posts: 75
Thanks for explaination!


Does that always work?


I have file with "1234567890abcdf..." as contents. That file is beeing fopened and fread.


fread() does internally an AmigaOS Read() to a internal stream buffer. Then the internal stream buffer is copied to the fread-argument. This copy stops the debugger. I see however in the debugger the internal stream buffer and it contains the values from the file, so the file was read and the values have been stored into the stream buffer. So the stream buffer cannot be uninitalited any more!?


Can AmigaOS Read() somehow outsmart your memory-not-initialised detection?


Invalid access. Addr=70149710 RW=R Size=1: Reading uninitialized memory
Page: 70149700 - 701497ff. State=R Modified=-, Start=00, End=100
D0 000000DD D1 7014970D D2 00000000 D3 00000000
D4 00000000 D5 00000000 D6 00000000 D7 401B4614
A0 70149710 A1 7014970F A2 700A868C A3 700A86C8
A4 4021FE98 A5 701204B4 A6 40000830 A7 7012048C
USP 7012048C ISP 400022A8 SFC 00000000 DFC 00000000
CACR 00000001 VBR 00000000 CAAR 00000000 MSP 00000000
T=00 S=0 M=0 X=0 N=1 Z=0 V=0 C=0 IMASK=0 STP=0
0: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan
2: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan
4: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan
6: 7FFF-FFFFFFFF-FFFFFFFF +nan 7FFF-FFFFFFFF-FFFFFFFF +nan
FPSR: 00000000 FPCR: 00000090 FPIAR: 00f8161a N=0 Z=0 I=0 NAN=0
70045FD2 [03DFCA] 1010 MOVE.B (A0) [35],D0
Segment 1: 000003e9 70008000-700a057b
70045FD4 [03DFCC] 1000 MOVE.B D0,D0
Next PC: 70045fd6
>m 7014970d
7014970D 3233 3435 3637 3839 3061 6263 6465 6667 234567890abcdefg
7014971D 6869 6A6C 6B6D 6E6F 7071 7273 7475 7677 hijlkmnopqrstuvw
7014972D 7879 7A0A 9999 9999 9999 9999 9999 9999 xyz.............

7014973D 9999 9999 9999 9999 9999 9999 9999 9999 ................
7014974D 9999 9999 9999 9999 9999 9999 9999 9999 ................

Last edited by selco; 26 June 2018 at 16:57.
selco is offline  
 
Page generated in 0.04314 seconds with 11 queries