Skip to content

Dangling pointer #307

New issue

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

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

Already on GitHub? # to your account

Closed
jacobwilliams opened this issue Mar 8, 2018 · 2 comments
Closed

Dangling pointer #307

jacobwilliams opened this issue Mar 8, 2018 · 2 comments
Labels

Comments

@jacobwilliams
Copy link
Owner

jacobwilliams commented Mar 8, 2018

From another ticket:

 Test removing data from the json structure:
Runtime Error: /home/themos/json-fortran/src/json_value_module.F90, line
1991: Dangling pointer P%PREVIOUS used as argument to intrinsic function
ASSOCIATED
Target was DEALLOCATEd at line 1995 of
/home/themos/json-fortran/src/json_value_module.F90
Program terminated by fatal error
/home/themos/json-fortran/src/json_value_module.F90, line 1991: Error
occurred in JSON_VALUE_MODULE:JSON_VALUE_DESTROY
/home/themos/json-fortran/src/json_value_module.F90, line 1978: Called by
JSON_VALUE_MODULE:JSON_VALUE_DESTROY
/home/themos/json-fortran/src/json_value_module.F90, line 2099: Called by
JSON_VALUE_MODULE:JSON_VALUE_REMOVE
/home/themos/json-fortran/src/tests/jf_test_1.f90, line 293: Called by
JF_TEST_1_MOD:TEST_1
/home/themos/json-fortran/src/tests/jf_test_1.f90, line 500: Called by
JF_TEST_1
Aborted (core dumped)

May be related to something mentioned here: https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/270495

Note: I don't have access to the NAG compiler, but it does work with both the Intel and Gfortran compilers.

jacobwilliams added a commit that referenced this issue Jul 13, 2018
@jacobwilliams
Copy link
Owner Author

@ThemosTsikas Could you try the 307-nag-fix branch and tell me if that fixes this issue on the NAG compiler?

Or anyone else who has access to the NAG compiler?

@jacobwilliams jacobwilliams changed the title NAG Issue Dangling pointer Jul 19, 2018
@jacobwilliams
Copy link
Owner Author

Note: this was a dangling pointer bug (as indicated in the link above) caused in the destroy routine. I think the same or similar crash is happening in the latest Intel compiler. The change in #350 fixes it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant