Skip to content

[fortran] explore if occassional memory corruption issue stems from substring replacement #18234

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ferdymercury
Copy link
Contributor

@ferdymercury ferdymercury commented Apr 2, 2025

This Pull request:

Changes or fixes:

By adding a space, we create an extra char that, on Fortran's side will be substituted by c, rather than appending to the string.

Related discussion: https://github.com/root-project/root/pull/15915/files

Fixes #15422
Fixes #14155

Copy link

github-actions bot commented Apr 2, 2025

Test Results

     8 files       8 suites   3d 8h 59m 33s ⏱️
 2 718 tests  2 714 ✅ 0 💤  4 ❌
20 872 runs  20 853 ✅ 0 💤 19 ❌

For more details on these failures, see this check.

Results for commit 0053a0a.

♻️ This comment has been updated with latest results.

…ubstring replacement

by adding a space, we create an extra char that will be substituted by c, rather than appending to the string
@ferdymercury ferdymercury added the clean build Ask CI to do non-incremental build on PR label Apr 2, 2025
@@ -312,7 +312,7 @@ int main(int argc, char **argv)

int lun = 10;
#ifndef WIN32
hropen(lun,PASSCHAR("example"),PASSCHAR(file_in),PASSCHAR("px"),record_size,ier,7,strlen(file_in),2);
hropen(lun,PASSCHAR("example"),PASSCHAR(file_in),PASSCHAR("px "),record_size,ier,7,strlen(file_in),2);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hropen(lun,PASSCHAR("example"),PASSCHAR(file_in),PASSCHAR("px "),record_size,ier,7,strlen(file_in),2);
hropen(lun,PASSCHAR("example"),PASSCHAR(file_in),PASSCHAR("px"),record_size,ier,7,strlen(file_in),2);

Does not seem to make much difference.

@ferdymercury ferdymercury added this to the 6.38.00 milestone Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean build Ask CI to do non-incremental build on PR
Projects
None yet
2 participants