Linux application memory corruption lazarus / 32-Linux ---------------------------------------------------------------------- Grahame Grieve · 2021-10-07 01:23 I have a linux application (a console application) that runs fine on ubuntu, under the debugger or not. But when a friends runs it in docker - also ubuntu - it totally fails with one of a series of weird memory corruption issues. it fails somewhere in the code below, but that seems solid to me, and I can't see why it would lead to memory corruption for him and not me. Does anyone have any idea what I should be looking for? procedure initialiseTZData(filename : String); var   stream : TFileStream;   z : TZDecompressionStream;   tar : TTarArchive;   entry : TTarDirRec;   bi : TBytesStream; begin   GTimeZoneData := TPascalTZ.create;   stream := TFileStream.Create(filename, fmOpenRead);   try     z := TZDecompressionStream.Create(stream, 15+16);     try       tar := TTarArchive.Create(z);       try         while tar.FindNext(entry) do         begin           if (StringArrayExists(TZ_FILES_STANDARD, entry.name)) then           begin             bi := TBytesStream.Create;             try               tar.ReadFile(bi);               bi.position := 0;               GTimeZoneData.ParseDatabaseFromStream(bi);             finally               bi.free;             end;           end;         end;       finally         tar.free;       end;     finally       z.free;     end;   finally     stream.Free;   end;   GLocalTZ := TTimeZone.create(''); end; ---------------------------------------------------------------------- Grahame Grieve · 2021-10-07 03:25 Progress of a sort; the docker builds the binary, and the binary it builds is corrupt - something to do with the compile process. I will provide an update when I have some progress ---------------------------------------------------------------------- ttomas · 2021-10-07 14:59 Check your docker image os version, libc exists and version, all other libs your app use. You can try https://github.com/Docker-Hub-frolvlad/docker-alpine-fpc ---------------------------------------------------------------------- Grahame Grieve · 2021-10-08 01:04 Thanks. Somehow it was the compile. We've got our CI build scripts here: https://github.com/grahamegrieve/fhirserver/tree/master/build, and they build good binaries