You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
As seen in this CI build https://github.com/OCamlPro/gnucobol/actions/runs/14155403038/job/39653980903 the first call to iconv with something that cannot be converted after a series of "valid" conversions returns -1, which is fine.
But really bad is that errno is not set (it is zero).
According to both the posix specification and the Linux manpage, errno is always set if the return value is -1.
Environment
OS: [e.g. Windows/Linux etc...] Windows (GitHub CI " windows-latest")
Compiler: revision MSVC 14.43.34808
To Reproduce
Steps to reproduce the behavior:
Follow the workflow at https://github.com/OCamlPro/gnucobol/actions/runs/14155403038/workflow.
Or just call iconv_open("IBM500","ASCII"), then iconv()` with a source size of 1 and source of 0x00 0x01 0x02 0x03 0x04 - as expected the last one gets a return value of -1, but errno is not set.
Expected behavior
Debug and Release should both behave according to docs and set the same error into errno.
The text was updated successfully, but these errors were encountered:
Describe the bug
As seen in this CI build https://github.com/OCamlPro/gnucobol/actions/runs/14155403038/job/39653980903 the first call to
iconv
with something that cannot be converted after a series of "valid" conversions returns -1, which is fine.But really bad is that errno is not set (it is zero).
According to both the posix specification and the Linux manpage, errno is always set if the return value is -1.
Environment
To Reproduce
Steps to reproduce the behavior:
Follow the workflow at https://github.com/OCamlPro/gnucobol/actions/runs/14155403038/workflow.
Or just call
iconv_open("IBM500","ASCII"), then
iconv()` with a source size of 1 and source of 0x00 0x01 0x02 0x03 0x04 - as expected the last one gets a return value of -1, but errno is not set.Expected behavior
Debug and Release should both behave according to docs and set the same error into errno.
The text was updated successfully, but these errors were encountered: