-
Notifications
You must be signed in to change notification settings - Fork 92
String and ByteString implementations have desynchronized #68
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
Comments
The third point causes a serious bug: With String:
With ByteString:
|
hasufell
added a commit
to hasufell/unix
that referenced
this issue
Jul 16, 2022
And fix free-bug in 'putEnv'. Fixes haskell#68
hasufell
added a commit
to hasufell/unix
that referenced
this issue
Jul 16, 2022
And fix free-bug in 'putEnv'. Fixes haskell#68
hasufell
added a commit
to hasufell/unix
that referenced
this issue
Jul 17, 2022
And fix free-bug in 'putEnv'. Fixes haskell#68
hasufell
added a commit
to hasufell/unix
that referenced
this issue
Jul 17, 2022
And fix free-bug in 'putEnv'. Fixes haskell#68
hasufell
added a commit
to hasufell/unix
that referenced
this issue
Jul 17, 2022
And fix free-bug in 'putEnv'. Fixes haskell#68
hasufell
added a commit
to hasufell/unix
that referenced
this issue
Jul 17, 2022
hasufell
added a commit
to hasufell/unix
that referenced
this issue
Jul 17, 2022
And fix free-bug in 'putEnv'. Fixes haskell#68
Bodigrim
pushed a commit
that referenced
this issue
Jul 17, 2022
Bodigrim
pushed a commit
that referenced
this issue
Jul 17, 2022
And fix free-bug in 'putEnv'. Fixes #68
hasufell
added a commit
to hasufell/unix
that referenced
this issue
Jul 19, 2022
hasufell
added a commit
to hasufell/unix
that referenced
this issue
Jul 19, 2022
And fix free-bug in 'putEnv'. Fixes haskell#68
hasufell
added a commit
that referenced
this issue
Jul 20, 2022
* Add regression test for #218 #218 Error was: uncaught exception: IOException of type InvalidArgument semTrywait: invalid argument (Bad file descriptor) * Fix 'semTrywait: invalid argument (Bad file descriptor)' wrt #218 * Add regression test for putEnv wrt #68 * Synchronize ByteString and String modules And fix free-bug in 'putEnv'. Fixes #68 * Add cabal.project * Fix the error handling of posix_fallocate other than FreeBSD This commit introduces a CPP guard to take care of the difference between OSes of the errors of posix_fallocate. On Linux and NetBSD, posix_fallocate reports error by returning an error number. errno is not set. On the other hand, on FreeBSD, posix_fallocate returns -1 and sets errno. The existing code could handle FreeBSD-style errors only. * Remove obsolete FreeBSD-style error handling The FreeBSD-style error (return -1, set errno) is obsolete as of FreeBSD 11.0; it now reports errors as same as the other OSes. * Future-proof glibc version check * Resource: Fix warning in case of no RLIM_SAVED_{CUR,MAX} This previously failed to build with a warning on FreeBSD 11.2 * Bump to 2.7.3 * Add Eq and Show instance to BaudRate Needed for test suite * Add CI * Tighten lower base bound to only allow GHC-8.2+ Co-authored-by: matil019 <[email protected]> Co-authored-by: Viktor Dukhovni <[email protected]> Co-authored-by: Ben Gamari <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I've been Backpack'ifying unix on the suggestion of @hvr, and I have realized that the String and ByteString implementations have desynchronized in a few cases. I'm still working my way through the modules but here are the ones I've noticed:
System.Posix.Env
unsetEnv name = putEnv (name ++ "=")
Pretty sure this is a type errorputEnv
usesuseAsCString
to allocate the string passed toputenv
, but String has a comment indicating we must not free the string after putenv according to SUSv2Actually, amazingly enough, I checked the rest of the implementations and this was the only desynchronization.
The text was updated successfully, but these errors were encountered: