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

Segmentation fault when autosaving long string-type fields #59

Open
simon-ess opened this issue Feb 22, 2024 · 0 comments · May be fixed by #60
Open

Segmentation fault when autosaving long string-type fields #59

simon-ess opened this issue Feb 22, 2024 · 0 comments · May be fixed by #60

Comments

@simon-ess
Copy link
Contributor

This is similar to what @MarkRivers reported in #53, but not the exact same

What we found is that the following creates a segmentation fault for what I presume to be a similar reason:

record(waveform, "foo") {
    field(NELM, "100")
    field(FTVL, "CHAR")
    info(autosaveFields, "VAL VAL$")
}

then the pArray is never initialised in this block: https://github.com/epics-modules/autosave/blob/606903e17/asApp/src/save_restore.c#L1423, since the waveform initially reports the number of max_elements as 0.

Note that if you only try to save VAL or VAL$ alone (or if FTVL is not CHAR then this doesn't happen.

In short, the behaviour of autosave with long strings is a bit bizarre and prone to issues.

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

Successfully merging a pull request may close this issue.

1 participant