Comments (2)
entry:
alloca a;
alloca b;
B1:
start(a);
++stack;
end(a);
B2:
start(b);
++stack
end(b);
fin:
leave(stack);
ret void;
Given a and b map to the same stack address X
:
stack_vars == {X, X} with map == { X }
Can leave
cause errorneous tracking?
from typeart.
Setting nounwind
for all callbacks fails test runtime/24_threads_type_check.cpp
with error free on unregistered address.
Tested for Clang-10.
Output without stack lifetime
>> Here we overwrite int32 with class.std::thread:
[Trace] Alloc 0x7fffe060c080 2 int32 4 1 (0x401891) S
[Warning]AllocationTracking.cpp:doAlloc:166:Pointer already in map 0x7fffe060c080 278 class.std::thread 8 1 (0x4018a5)
[Trace] Alloc 0x7fffe060c080 278 class.std::thread 8 1 (0x4018a5) S
<< end
>> Here we overwrite the first int32 with class.std::thread:
[Trace] Alloc 0x7fffe060c070 2 int32 4 1 (0x4018b9) S
[Trace] Alloc 0x7fffe060c064 2 int32 4 1 (0x4018cd) S
[Warning]AllocationTracking.cpp:doAlloc:166:Pointer already in map 0x7fffe060c070 278 class.std::thread 8 1 (0x4018e1)
[Trace] Alloc 0x7fffe060c070 278 class.std::thread 8 1 (0x4018e1) S
<< end
.....
[Trace] Stack after free: 11
[Trace] Freeing stack (11) 11
...
[Trace] Free 0x7fffe060c080 278 class.std::thread 8 1 (0x4018a5)
[Error]AllocationTracking.cpp:operator():214:Free on unregistered address 0x7fffe060c080 (0x401a9f)
[Trace] Free 0x7fffe060c070 278 class.std::thread 8 1 (0x4018e1)
[Trace] Free 0x7fffe060c064 2 int32 4 1 (0x4018cd)
[Error]AllocationTracking.cpp:operator():214:Free on unregistered address 0x7fffe060c070 (0x401a9f)
[Trace] Stack after free: 0
############################################
Allocation type detail (heap, stack, global)
...
2 : 0 , 2484 , 0 , int32
#########################################
Free allocation type detail (heap, stack)
...
2 : 0 , 2482 , int32
Output with stack lifetime
[Trace] Alloc 0x7ffecda47888 2 int32 4 1 (0x401902) S
....
[Warning]AllocationTracking.cpp:doAlloc:166:Pointer already in map 0x7ffecda47888 278 class.std::thread 8 1 (0x401936)
[Trace] Alloc 0x7ffecda47888 278 class.std::thread 8 1 (0x401936) S
[Trace] Alloc 0x7ffecda47878 2 int32 4 1 (0x40194d) S
...
[Warning]AllocationTracking.cpp:doAlloc:166:Pointer already in map 0x7ffecda47878 278 class.std::thread 8 1 (0x401986)
[Trace] Free 0x7f6bfc579d1c 2 int32 4 1 (0x401311)
[Trace] Alloc 0x7ffecda47878 278 class.std::thread 8 1 (0x401986) S
.....
[Trace] Stack after free: 11
[Trace] Freeing stack (11) 11
[Trace] Free 0x7ffecda47888 278 class.std::thread 8 1 (0x401936)
[Error]AllocationTracking.cpp:operator():214:Free on unregistered address 0x7ffecda47888 (0x401aaf)
[Trace] Free 0x7ffecda47878 278 class.std::thread 8 1 (0x401986)
[Error]AllocationTracking.cpp:operator():214:Free on unregistered address 0x7ffecda47878 (0x401aaf)
[Trace] Stack after free: 0
from typeart.
Related Issues (20)
- GlobalValue filtering based on linkage rework
- LLVM coverage fails for the filter library target
- Compiler wrapper single TU
- CMake - Runtime misnamed MPI logger flag
- Opague Pointers
- run.sh fails to link when using <random>
- CMake - compile standard of C test objects wrong
- Segfault when (thread) CounterStats is called with empty vector
- Install scripts (run/apply)
- 🔬 Tracking issue for array cookie support
- Tracking issue for demo folder HOT 1
- 🔬 Tracking issue for MPI type checking
- Tracking issue for compiler wrapper
- Library/Executable file naming scheme
- Runtime exits without types.yaml even if not needed
- Logger may interleave lines in multi-threaded context
- CI condition for installing LLVM libc++ wrong
- Script template "typeart-tmpl.sh.in" readonly var assigned twice
- CI succeeds when tests are unsupported in all configs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typeart.