Issue 2573 task: purge darcs of all uses of ByteString internals

Title task: purge darcs of all uses of ByteString internals
Priority urgent Status needs-implementation
Milestone Resolved in
Superseder Nosy List bfrk
Assigned To

Created on 2018-03-05.22:31:05 by bfrk, last changed 2020-07-31.21:56:08 by bfrk.

msg19942 (view) Author: bfrk Date: 2018-03-05.22:31:03
Here is a link with the details:


My conclusion from this thread is that we MUST purge darcs of all uses
of Data.ByteString.Internal. Working with BS internals is apparently so
much more hazardous than any mere low-level raw pointer programming that
I don't trust anybody besides Mr. Duncat Coutts himself and a few select
 experts to get this right.
msg19949 (view) Author: bfrk Date: 2018-03-07.13:48:17
The issue with my refactored linesPS has been cleared up thanks to
Betram Felgenhauer who showed that betweenLinesPS (which calls linesPS)
makes invalid assumptions about the way the ForeignPtrs inside a
ByteString are allocated. In particular, empty ByteString can be
represented as a NULL pointer. I have a fix for this particular abuse of
ByteString internals in petto.

We still have to see to the other places where we access ByteString
internals. This should be a priority before we make a new release.
msg20070 (view) Author: bfrk Date: 2018-03-28.20:15:03
I have made some progress with this, see my latest patches at
Date User Action Args
2018-03-05 22:31:05bfrkcreate
2018-03-07 13:48:19bfrksetmessages: + msg19949
2018-03-07 13:48:54bfrksetpriority: urgent
milestone: 2.14.0
2018-03-28 20:15:04bfrksetmessages: + msg20070
2018-11-26 10:49:57koweysetstatus: unknown -> needs-implementation
2020-07-31 21:56:08bfrksetmilestone: 2.14.0 ->