DynamoRIO / DynamoRIO/drmemory

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

Open
#2,248 10 comments 0 reactions 0 assignees View on GitHub
Bug-FalsePositive help wanted OpSys-MinGW
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

**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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.