DynamoRIO/drmemory

"UNADDRESSABLE ACCESS beyond top of stack" message because of __chkstk with mingw-w64 on Win7 or Win10

Open

#2,248 建立於 2020年2月6日

在 GitHub 查看
 (10 留言) (0 反應) (0 負責人)C (289 fork)auto 404
Bug-FalsePositiveOpSys-MinGWhelp wanted

倉庫指標

Star
 (2,727 star)
PR 合併指標
 (PR 指標待抓取)

描述

Describe the bug

on Windows 7 and 10, compiling with mingw-w64 (and possibly with clang too), I get the following error message :

 Error #5: UNADDRESSABLE ACCESS beyond top of stack: reading
 0x000000000065ec68-0x000000000065ec70 8 byte(s)
 # 0 libeina-1.dll!___chkstk_ms
 [E:/mingwbuild/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/CRT_fp10.c:24]
 # 1 libeina-1.dll!eina_xdg_env_init [../src/lib/eina/eina_vpath_xdg.c:17]
 # 2 libeina-1.dll!eina_vpath_init   [../src/lib/eina/eina_vpath.c:186]
 # 3 libeina-1.dll!eina_init         [../src/lib/eina/eina_main.c:327]
 # 4 libecore-1.dll!ecore_init       [../src/lib/ecore/ecore.c:248]
 # 5 libecore_evas-1.dll!ecore_evas_init [../src/lib/ecore_evas/ecore_evas.c:609]
 # 6 main
 [C:\Documents\msys2\home\vincent.torri\code/ecore_evas_keys.c:48] 
 Note: @0:00:02.705 in thread 8348 
 Note: 0x000000000065ec68 refers to 4072 byte(s) beyond the top of the
 stack 0x000000000065fc50
 Note: instruction: or     $0x0000000000000000 (%rcx) -> (%rcx) 

see https://groups.google.com/forum/#!topic/drmemory-users/E2t9SKfA8Rk and https://groups.google.com/forum/#!topic/drmemory-users/2p1pSZ_fIFA

___chkstk_ms seems to be a new variant of ___chkstk, not supported yet by drmemory

To Reproduce

latest mingw-w64 toolchain, write a function with more than 4096 bytes of local variables

Expected behavior

no such message should appear as it is a normal behavior to enlarge stack when necessary in that case

Versions

  • What version of Dr. Memory are you using?

drmemory : 2.2.0-1

  • What operating system version are you running on?

Win 7 and Win 10

  • Is your application 32-bit or 64-bit?

both

regards

Vincent Torri

貢獻者指南