[fpc-pascal] GDeque unit crash, FPC trunk

AlexeyT aaa5500 at ya.ru
Sun Jan 27 19:40:56 CET 2019


I see stange crash in gdeque unit if I use unit from FPC trunk
https://github.com/graemeg/freepascal/blob/master/packages/fcl-stl/src/gdeque.pp

crash in TDeque.PushFront, i cannot understand it and i don't know the code.
pls, reproduce it like me:

- Linux gtk2 x64 (Ubuntu 18.4), fpc 3.0.4, lazarus 2.1 trunk
- get CudaText source and compile it
http://wiki.freepascal.org/CudaText#How_to_compile_program
- unit atsynedit_adapter_cache.pas uses "gdeque"
- now I got FPC trunk file and copied it to atsynedit_deque.pas. Changed 
'uses' to use renamed unit.
- run CudaText in IDE, in CudaText open IDE's main.pp (huge file), go to 
file end, hold the UP arrow to scroll up
- after 1-2 screens are scrolled, i see crash

What causes crash - maybe last diff?
https://github.com/graemeg/freepascal/commit/dc5d2d526db9991af9c6cbada85ce1ab2424c9b4#diff-d1eb1c2b51ef448804f4d14e46ba7eed
i tried to change new Increase* method with simple code like
FCapacity*=2; and it don't help.

-- 
Regards,
Alexey




More information about the fpc-pascal mailing list