On Fri, 2022-12-16 at 19:37 +0100, Gerhard Sittig wrote: > > On Sun, 2022-12-11 at 02:30 +0100, Markus Heidelberg wrote: > > > > I found some crashes using PulseView with specific command line options. > > > > https://github.com/sigrokproject/libsigrok/pull/202 > > Am in the process of taking the part that I'm confident about, > the trace32 input. Samplerates should be u64 everywhere, no > questions asked. > > Am more reluctant on the bindings, since I don't know and don't > use most of them. Would be good to have more eyes on this part of > your submission.
Can you check https://repo.or.cz/libsigrok/gsi.git/shortlog/refs/heads/binding-u32 and ACK or NAK the squash that I would apply to take it mainline? As usual, alternatively provide something different which I should then take instead. There are two issues at play AFAICS. One is that the input module internally used u32 for a samplerate. There is no doubt about the first commit which addresses this. The other issue that you noticed is that current bindings seem to completely lack u32 conversion support. Haven't checked in detail which config properties of drivers and inputs are affected. Your commit message listed a few, am not aware of seeing other users' reports for any of these. But fixing them is worthwile. In practise it would be rare, but in theory building the library and its bindings with a C++ compiler that is not modern C++ is possible. It is a currently supported configuration that I would not want to break without a good reason. That's why I also added a fallback stoul(3) implementation (and put it before its potential use). Would like to get other readers' opinion on the Python binding. What's happening with large u32 values (MSB set) on 32bit platforms? If this turns out to be an issue after the series was taken, then I suggest to submit followup commits. Even better would be to consider this now and address it if needed. My guess is that "truncation" to the u32 data type after conversion would result in expected behaviour, maybe out of range input specs could go unnoticed. Depends on the platform's Python implementation it seems. virtually yours Gerhard Sittig -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel