Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fpm test with ifx compiler fails #16

Closed
fluidnumerics-joe opened this issue Dec 6, 2023 · 1 comment · Fixed by #19
Closed

fpm test with ifx compiler fails #16

fluidnumerics-joe opened this issue Dec 6, 2023 · 1 comment · Fixed by #19
Labels
bug Something isn't working

Comments

@fluidnumerics-joe
Copy link
Member

When testing feq-parse with fpm and the ifx compilers (Intel OneAPI Fortran compiler), the library is built fine, but the tests fail with the following output :

[100%] Project compiled successfully.
==142949==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x1cae1c7 in feqparse_MP_evaluate_r1fp32_ /home/joe/apps/feq-parse/././src/FEQParse.F90:626:22
    #1 0x4b2e61 in test_IP_abs_r1fp32_ /home/joe/apps/feq-parse/test/abs_r1fp32.f90:31:11
    #2 0x49570a in MAIN__ /home/joe/apps/feq-parse/test/test.f90:8:32
    #3 0x40bdc8 in main (/home/joe/apps/feq-parse/build/ifx_22B6DB2C5432A52F/test/test+0x40bdc8) (BuildId: 272f7830ff877cb06dbd47b919083d5eb9c71d91)
    #4 0x7f9161829d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #5 0x7f9161829e3f in __libc_start_main csu/../csu/libc-start.c:392:3
    #6 0x40bc94 in _start (/home/joe/apps/feq-parse/build/ifx_22B6DB2C5432A52F/test/test+0x40bc94) (BuildId: 272f7830ff877cb06dbd47b919083d5eb9c71d91)

  Uninitialized value was stored to memory at
    #0 0x41251e in __msan_memcpy (/home/joe/apps/feq-parse/build/ifx_22B6DB2C5432A52F/test/test+0x41251e) (BuildId: 272f7830ff877cb06dbd47b919083d5eb9c71d91)
    #1 0x1cae16e in feqparse_MP_evaluate_r1fp32_ /home/joe/apps/feq-parse/././src/FEQParse.F90:624:9
    #2 0x4b2e61 in test_IP_abs_r1fp32_ /home/joe/apps/feq-parse/test/abs_r1fp32.f90:31:11
    #3 0x49570a in MAIN__ /home/joe/apps/feq-parse/test/test.f90:8:32
    #4 0x40bdc8 in main (/home/joe/apps/feq-parse/build/ifx_22B6DB2C5432A52F/test/test+0x40bdc8) (BuildId: 272f7830ff877cb06dbd47b919083d5eb9c71d91)
    #5 0x7f9161829d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16

  Uninitialized value was stored to memory at
    #0 0x1c48597 in feqparse_tokenstack_MP_equals_token_ /home/joe/apps/feq-parse/././src/FEQParse_TokenStack.F90:119:5
    #1 0x1cae156 in feqparse_MP_evaluate_r1fp32_ /home/joe/apps/feq-parse/././src/FEQParse.F90:624:13
    #2 0x4b2e61 in test_IP_abs_r1fp32_ /home/joe/apps/feq-parse/test/abs_r1fp32.f90:31:11
    #3 0x49570a in MAIN__ /home/joe/apps/feq-parse/test/test.f90:8:32
    #4 0x40bdc8 in main (/home/joe/apps/feq-parse/build/ifx_22B6DB2C5432A52F/test/test+0x40bdc8) (BuildId: 272f7830ff877cb06dbd47b919083d5eb9c71d91)
    #5 0x7f9161829d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16

  Uninitialized value was created by a heap allocation
    #0 0x4196a6 in malloc (/home/joe/apps/feq-parse/build/ifx_22B6DB2C5432A52F/test/test+0x4196a6) (BuildId: 272f7830ff877cb06dbd47b919083d5eb9c71d91)
    #1 0x1ef6354 in _mm_malloc (/home/joe/apps/feq-parse/build/ifx_22B6DB2C5432A52F/test/test+0x1ef6354) (BuildId: 272f7830ff877cb06dbd47b919083d5eb9c71d91)
    #2 0x1e77ee3 in do_alloc_copy for_alloc_copy.c
    #3 0x1e79770 in do_alloc_copy for_alloc_copy.c
    #4 0x1e79770 in do_alloc_copy for_alloc_copy.c
    #5 0x1e7a2e6 in do_alloc_assign for_alloc_copy.c
    #6 0x1e7a38e in for_alloc_assign_v2 (/home/joe/apps/feq-parse/build/ifx_22B6DB2C5432A52F/test/test+0x1e7a38e) (BuildId: 272f7830ff877cb06dbd47b919083d5eb9c71d91)
    #7 0x4b0d86 in test_IP_abs_r1fp32_ /home/joe/apps/feq-parse/test/abs_r1fp32.f90:22:3
    #8 0x49570a in MAIN__ /home/joe/apps/feq-parse/test/test.f90:8:32
    #9 0x40bdc8 in main (/home/joe/apps/feq-parse/build/ifx_22B6DB2C5432A52F/test/test+0x40bdc8) (BuildId: 272f7830ff877cb06dbd47b919083d5eb9c71d91)
    #10 0x7f9161829d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16

SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/joe/apps/feq-parse/././src/FEQParse.F90:626:22 in feqparse_MP_evaluate_r1fp32_
Exiting
<ERROR> Execution for object " test " returned exit code  1
<ERROR> *cmd_run*:stopping due to failed executions
STOP 1

However, the ifx compilers build and test fine with the CMake build system

@fluidnumerics-joe fluidnumerics-joe added the bug Something isn't working label Dec 6, 2023
@fluidnumerics-joe
Copy link
Member Author

Thanks to Ivan Pribec for pointing this out on fortran-lang discourse : https://fortran-lang.discourse.group/t/use-of-uninitialized-value-warning-with-check-all-option-of-ifx/6823/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant