cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | the secret reason for us trying to get PyPy users: to test the JIT well enough that we're somewhat confident about it
<kpdemetriou>
I'm experiencing an interesting memory corruption issue with CFFI, who can I talk to?
<simpson>
There's a few folks. I'm not really one of them, but I can guess that they'd want to see a reproducer of some sort. Often folks are asked to open bugs on the issue tracker if it's definitely a cffi fault.
<kpdemetriou>
Understandable, I can publish the draft source code, this is meant for an open source project after all. It seems to be some kind of progressive memory corruption issue where after several thousand iteration of a function I encounter a SEGFAULT. Meanwhile the exact same functionality running inside a simple main() C harness works beautifully. This is pure compute, no network and/or other I/O.
<kpdemetriou>
I mean, they're not mutually exclusive. CFFI allows reuse of existing C code. Especially when it comes to cryptography, you might want to use tried and tested implementations.
speeder39 has joined #pypy
<kpdemetriou>
As for the stack, you can see pointers to very low memory addresses right before the segfaults. Things like 0x0, 0x42, etc...
<kpdemetriou>
The curious thing is that when used outside of CFFI, the C code works perfectly.
<simpson>
Well, sure. libsodium is one of the few exceptions that we allow in Monte, and we're pretty anti-C. It's just that sometimes people reach for other-than-PyPy when they need to make Python faster, and that makes me a sad panda.
mattip has quit [Ping timeout: 265 seconds]
<simpson>
IIRC ffi.cast() isn't type-safe, so I'd really try to eliminate those and then see if you can still reproduce.
<njs>
arigato: I'd seriously consider removing the pure-python sha fallback... people are used to having to fight with openssl, no-one will blame pypy for that, and it's basically a requirement for almost everyone these days anyway. But people will definitely get bitten by unusably-slow sha.
oberstet has quit [Remote host closed the connection]
realitix has quit [Ping timeout: 264 seconds]
realitix_ is now known as realitix
oberstet has joined #pypy
lritter has joined #pypy
realitix has quit [Quit: realitix]
realitix has joined #pypy
realitix has quit [Client Quit]
realitix has joined #pypy
realitix has quit [Client Quit]
kpdemetriou has joined #pypy
realitix has joined #pypy
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 256 seconds]
jacob22__ has joined #pypy
DIRT has quit [Quit: Leaving]
jcea has joined #pypy
jacob22__ has quit [Ping timeout: 264 seconds]
tayfun26 has joined #pypy
stevenja_ has joined #pypy
stevenja_ has quit [Ping timeout: 244 seconds]
ronan has quit [Quit: Ex-Chat]
Rhy0lite has joined #pypy
lritter has quit [Remote host closed the connection]
oberstet has quit [Ping timeout: 256 seconds]
marky1991 has joined #pypy
oberstet has joined #pypy
<tos9>
arigato: I forget, are you in Lausanne or Lucerne
<cfbolz>
tos9: leysin
<cfbolz>
(which is closish to lausanne)
adamholmberg has joined #pypy
realitix has quit [Quit: realitix]
realitix has joined #pypy
<tos9>
ah
jacob22__ has joined #pypy
* tos9
will likely pass through the latter next week but doesn't appear that is very close :)
realitix has quit [Client Quit]
realitix has joined #pypy
Gonsor has joined #pypy
<cfbolz>
tos9: indeed not
<tos9>
cfbolz: and you are ... somewhere in the mysterious hillside of germany right?
<cfbolz>
eh, not since a number of years
<cfbolz>
in duisburg
<cfbolz>
(closish to cologne)
<tos9>
oh interesting
<cfbolz>
tos9: where do you live?
<fijal>
tos9: hi!
<fijal>
tos9: what you up to?
<tos9>
cfbolz: NYC, but I get around a bit thankfully :)
<tos9>
fijal: I got bored
<tos9>
fijal: So I am planning a trip for sunday :)
<fijal>
fair
<tos9>
fijal: NYC -> Paris -> Zurich (well Lucerne) -> Tel Aviv -> Milan to meet Flavio -> Drive to spain -> London I think
<tos9>
fijal: Are you in any of these places
<tos9>
or back in za?
<cfbolz>
hehe
<fijal>
I'm in za for winter
<fijal>
"winter"
<tos9>
oy
<cfbolz>
tos9: I'll be in bilbao the first ten days of august, fwiw
<tos9>
cfbolz: oh! Nice
<tos9>
cfbolz: I think so will we
<cfbolz>
it's a vacation, but if you want to have a coffee let me know
<tos9>
yeah same will do
<cfbolz>
:-)
<tos9>
fijal: see what you are missing in your snow
<fijal>
I've seen some snow
<fijal>
which is quite impressive given that it was 28 a couple days ago
<fijal>
(C not F)
<tos9>
fijal: a hard life you live
realitix has quit [Quit: realitix]
<fijal>
tos9: I don't actually like it warm
<fijal>
tos9: are you going to start a startup?
realitix has joined #pypy
realitix has quit [Client Quit]
realitix has joined #pypy
<tos9>
fijal: is that a serious question
<tos9>
fijal: I don't have a decent enough idea yet that I'd want to spend my whole day on, and I probably would want to do that while still working at a company since I have too many expensive hobbies to quit and start from the bottom :/