SIGSEGV when asking for TObjectDictionary<TRecordWithTwoInt64Fields, TObject>.ContainsKey
## Summary A SIGSEGV is thrown when asking for `ContainsKey` of a `TObjectDictionary` of record containing two 64 bits integers -> some object. ## System Information - **Operating system:** Debian GNU/Linux 10 (buster) - **Processor architecture:** x86-64 - **Compiler version:** trunk (4430422489633ac2fcd7c8833267ecf9cfbb9361) - **Device:** Desktop ## Steps to reproduce 1. Ask for `specialize TObjectDictionary<TRecord, TObject>.ContainsKey(something)` where `TRecord` contains two(!) entries of `Int64` type. Like a coordinate vector. ## Example Project ```Pascal program genericbug; uses Generics.Collections, Generics.Defaults; type TRec = record X: Int64; Y: Int64; end; TDict = specialize TObjectDictionary<TRec, TObject>; var Dict: TDict; R: TRec; begin Dict := TDict.Create([doOwnsValues]); R.X := 1; R.Y := 1; if not Dict.ContainsKey(R) then // <---------- SIGSEGV here Dict.Add(R, TObject.Create); Dict.Free; end. ``` ## What is the current bug behavior? SIGSEGV ## What is the expected (correct) behavior? Properly return `false`. ## Relevant logs and/or screenshots ![2023-01-01-182940_1366x768_scrot](/uploads/7f428d24e453985f8f2745804f67f826/2023-01-01-182940_1366x768_scrot.png) ## Possible fixes It seems to be a relatively recent bug. It was working without issues at Trunk version of around April 2022 at almost exactly the same environment (except for fpc+Lazarus version).
issue