histogram icon indicating copy to clipboard operation
histogram copied to clipboard

Unsafe access to accumulator data

Open HDembinski opened this issue 4 years ago • 5 comments

  • [ ] Test this with downstream boost-histogram

HDembinski avatar Apr 27 '21 11:04 HDembinski

@henryiii Before I change all accumulators in this way, we should try first whether this change works the way we expect in boost-histogram. I can try to make the changes to test this in boost-histogram.

HDembinski avatar Apr 27 '21 11:04 HDembinski

Can this be rebased on top of current develop?

henryiii avatar Aug 19 '21 13:08 henryiii

@henryiii Rebased on develop as you requested

HDembinski avatar Sep 26 '21 10:09 HDembinski

Thanks, I'll work on this further soon - might be after Python 3.10 / pybind11 2.8 / Windows 11 though, all to be released next Monday. (I don't think Windows 11 affects me, but recently noticed it had the same release date as Python 3.10) First initial try showed it will take some work, but didn't get far enough for good feedback yet.

henryiii avatar Sep 30 '21 16:09 henryiii

FYI, I did attempt this a little while ago, but it will take a bit of work to properly implement. Boost-histogram has to know the memory layout exactly, since it can cast between a block of Python memory to C++ without copy. Convincing pybind11 of this without access to the actual structure just requires manual work for things normally covered by macros. I'll try to get back to this in ~1 week.

henryiii avatar Feb 08 '22 16:02 henryiii