zeroshade commented on PR #1650:
URL: https://github.com/apache/arrow-go/pull/1650#issuecomment-7137036258

   Thanks, 7e0212de is what I asked for.
   
   One more thing, which my earlier run missed because I didn't use the 
`assert` tag: CI runs with `-tags assert,test`, and with those tags 
`TestStreamFuzzRegression` fails on 
`clusterfuzz-testcase-minimized-arrow-ipc-stream-fuzz-5455172100423680` with 
`unexpected panic: too many releases`. This isn't caused by your loader change 
(it fails the same way with main's `file_reader.go`); your new test exposes an 
existing double release:
   
   ```
   array.(*Data).Release        arrow/array/data.go:144
   dictutils.(*Memo).Clear      arrow/internal/dictutils/dict.go:253
   ipc.(*Reader).Release        arrow/ipc/reader.go:195
   ```
   
   `Memo.reify` in `arrow/internal/dictutils/dict.go` does `defer 
data.Release()` for every part it combines (the dictionary and its delta 
batches), whether or not `array.Concatenate` succeeds. On this input 
`Concatenate` fails (`slice bounds out of range`), so the memo keeps the parts 
whose references were already dropped, and `Memo.Clear` releases them again 
when the reader is released.
   
   Since it's the same kind of fix as the rest of this PR (releasing correctly 
on decode errors) and it's what keeps the new test from passing in CI, could 
you include it here? Releasing the parts only after `Concatenate` succeeds and 
`memo.id2dict[id]` holds the combined dictionary should be enough; on failure 
the memo keeps its references and `Clear` releases each once.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to