Comments (7)
recursive subroutine free_map_entry_pool(pool) seems to be the free memory routine that is causing the error.
from stdlib.
Thank you @chuckyvt for reporting the issue.
I used ifx 2024.0.2
and I could not run even the following simple program:
program main
use stdlib_hashmaps, only: chaining_hashmap_type
use stdlib_hashmap_wrappers, only: fnv_1_hasher
implicit none
call hash_test
contains
subroutine hash_test
type(chaining_hashmap_type) :: map
call map%init(fnv_1_hasher)
end subroutine hash_test
end program main
I got the following error on my Fedora computer:
$ fpm run
Project is up to date
==226944==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x4aaed7 in stdlib_hashmaps_MP_init_chaining_map_ /home/jvandenp/test_hash/build/dependencies/stdlib/src/stdlib_hashmap_chaining.f90:472:9
#1 0x48b0c3 in main_IP_hash_test_ /home/jvandenp/test_hash/app/main.f90:16:10
#2 0x489cf3 in MAIN__ /home/jvandenp/test_hash/app/main.f90:8:6
#3 0x40a5c8 in main (/home/jvandenp/test_hash/build/ifx_22B6DB2C5432A52F/app/test_hash+0x40a5c8) (BuildId: e27a311375dcefa55955a7499cd17857dcbbaed4)
#4 0x7ffa4822950f in __libc_start_call_main (/lib64/libc.so.6+0x2950f) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#5 0x7ffa482295c8 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x295c8) (BuildId: 8257ee907646e9b057197533d1e4ac8ede7a9c5c)
#6 0x40a494 in _start (/home/jvandenp/test_hash/build/ifx_22B6DB2C5432A52F/app/test_hash+0x40a494) (BuildId: e27a311375dcefa55955a7499cd17857dcbbaed4)
Uninitialized value was created by an allocation of 'var$66' in the stack frame
#0 0x4a6ccb in stdlib_hashmaps_MP_init_chaining_map_ /home/jvandenp/test_hash/build/dependencies/stdlib/src/stdlib_hashmap_chaining.f90:417:42
SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/jvandenp/test_hash/build/dependencies/stdlib/src/stdlib_hashmap_chaining.f90:472:9 in stdlib_hashmaps_MP_init_chaining_map_
Exiting
<ERROR> Execution for object " test_hash " returned exit code 1
<ERROR> *cmd_run*:stopping due to failed executions
STOP 1
Could you test it on your computer, please?
I am wondering if it is not a bug of the compiler itself.
from stdlib.
Update: it seems to be a more general issue: see here for more details.
from stdlib.
Interesting. I'm on Windows, and I believe IFX for Linux has more detailed memory sanitizer features, so I am not seeing this. I will say I have tested the posted code snippet with IFX, IFort, and GFortran 13.2 and see the same behavior for all. So at this point, it doesn't seem to be compiler specific.
from stdlib.
Strange. I can compile and run the posted code snippet with GCC 12.2.1. on my Fedora computer.
Do you have similar problems with the stdlib
tests or examples? All of them are tested with GCC 13 in the CI (Linux and Windows).
from stdlib.
Ok, so I think I have this run to ground. Long story short, the failure is due to a stack overflow as best I can tell, though the program doesn't say that. (Just returns a memory access error vs a specific stack overflow message I'm used to). This would explain the different behavior between Linux and Windows. I have increased the stack size and now runs ok.
As a side note, since on the stdlib test cases the hashtable is at the main program level, the final procedure is never called in the checks I put together. Structuring a test case so that the hastable is in a subroutine or similar may be a decent idea to include at some point.
from stdlib.
Thank you @chuckyvt for clarifying and closing the issue.
As a side note, since on the stdlib test cases the hashtable is at the main program level, the final procedure is never called in the checks I put together. Structuring a test case so that the hastable is in a subroutine or similar may be a decent idea to include at some point.
Good point. Don't hesitate to submit a PR with such a test. Otherwise I'll try to do it.
from stdlib.
Related Issues (20)
- macos-12 builds failing again HOT 1
- `svd` not working for matrices with a single column HOT 6
- Elemental conversion functions from degrees to radians and vice versa. HOT 2
- Invalid author picture in API documentation web page
- Should installation set include paths specifying GCC (gfortran) version? HOT 5
- Build failure in test-drive with Windows/Intel compiler HOT 1
- Proposal: File handling procedures (goto, touch, grep) HOT 3
- Proposal: procedure to count number of words in a string HOT 4
- CI fails trying to install `pip` package on `msys2` HOT 2
- Use `main` as default branch HOT 1
- CI running twice, doesn't `on: [push]` suffice? HOT 1
- Internal stream I/O
- Neural network activation functions HOT 1
- Add derived types for date and date/time
- `loadtxt` test occasionally fails HOT 1
- build system issue
- Include factorials in `stdlib_constants` module
- Functions for the built-in string type
- Installation under windows is not working
- Support reading and writing in Zarr
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 stdlib.