On 2019-10-07 13:57, Vlad Khorsun wrote:
05.10.2019 11:41, Mark Rotteveel wrote:
On 3-10-2019 18:23, Mark Rotteveel wrote:
On 30-9-2019 00:09, Vlad Khorsun wrote:
28.09.2019 18:46, Mark Rotteveel wrote:
I have no idea what to look for. I looked with procmon, and don't
really notice anything weird, except that after loading fbclient
and what looks like initializing winsock, it calls WerFault.exe
Does WER creates some report with description of the issue ?
If it creates memory dump also, i would like to look at it.
I'll see if I can find it.
I had to enable it in the registry, but now I have created a minidump,
which is available at
https://www.dropbox.com/s/6egvdldu3ih63ej/flamerobin.exe.8156.dmp?dl=0.
Thanks. The call stack points to the function
ttmath_addindexed2_x64()
# Call Site
00 ntdll!NtWaitForMultipleObjects+0x14
01 ntdll!WerpWaitForCrashReporting+0xa8
02 ntdll!RtlReportExceptionHelper+0x33e
03 ntdll!RtlReportException+0x9b
04 ntdll!LdrpInitializeNode$filt$1+0x33
05 ntdll!_C_specific_handler+0x96
06 ntdll!RtlpExecuteHandlerForException+0xf
07 ntdll!RtlDispatchException+0x219
08 ntdll!KiUserExceptionDispatch+0x2e
09 FBCLIENT!ttmath_addindexed2_x64+0x9
0a FBCLIENT!ttmath::UInt<2>::AddTwoInts(unsigned int64 x2 = <Value
unavailable error>, unsigned int64 x1 = <Value unavailable error>,
unsigned int64 index = <Value unavailable error>)+0x1c
[c:\snapshots\firebird\extern\ttmath\ttmathuint_x86_64.h @ 336]
0b FBCLIENT!ttmath::UInt<2>::MulInt+0x48
[c:\snapshots\firebird\extern\ttmath\ttmathuint.h @ 811]
0c FBCLIENT!ttmath::Int<2>::MulInt+0x97
[c:\snapshots\firebird\extern\ttmath\ttmathint.h @ 421]
0d FBCLIENT!Firebird::I128limit::{ctor}+0xc0
[c:\snapshots\firebird\src\common\int128.h @ 140]
0e FBCLIENT!`anonymous namespace'::`dynamic initializer for
'i128limit''(void)+0xe7
[c:\snapshots\firebird\src\common\int128.cpp @ 49]
0f ucrtbase!initterm+0x3e
10 FBCLIENT!dllmain_crt_process_attach(struct HINSTANCE__ * instance =
0x00007ff9`ea630000, void * reserved = 0x00000000`00000000)+0xae
[d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp@
66]
11 FBCLIENT!dllmain_dispatch(struct HINSTANCE__ * instance =
0x00007ff9`ea630000, unsigned long reason = 1, void * reserved =
0x00000000`00000000)+0x74
[d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp@
195]
12 ntdll!LdrpCallInitRoutine+0x65
13 ntdll!LdrpInitializeNode+0x1b1
The failed instruction is
mov r10,qword ptr [esp+28h]
note, the ttmath_addindexed2_x64() function is implemented in
assembler.
The bug is that on x64 applications should use RSP register, not ESP
(64-bit, not 32-bit).
AV happens only when high 32-bits in RSP is non-zero.
The patch is committed, please try next snapshot build.
Thanks!
Given we use an external library for this, is this also fixed upstream?
Based on your fix, I found two references for this:
- From 2012:
https://www.ttmath.org/issue/ttmathuint_x86_64_msvc.asm_uses_esp_instead_of_rsp_causing_general_protection_fault
- From 2017, saying it is fixed:
https://www.ttmath.org/forum/bug_in_ttmathuint_x86_64_msvc.asm
Are we using an older version than that fixed version of 2017?
Mark
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel