cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4820 [mattip: force build, winconsoleio]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4821 [Andy Lawrence: force build, winconsoleio]
<kenaan> Yannick_Jadoul py3.7 5972be85ad6d /pypy/objspace/std/: Making sure __class_getitem__ is a classmethod, even when not annotated with @classmethod
jcea has quit [Quit: jcea]
agates[m] has quit [Remote host closed the connection]
bendlas has quit [Write error: Connection reset by peer]
edd[m] has quit [Read error: Connection reset by peer]
adamholmberg has joined #pypy
bendlas has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
<astronavt> out of curiosity, what's the obstacle to having windows binaries for pypy?
<astronavt> meaning the usual exe/msi installer type of thing
<astronavt> developer time? nobody owns a windows machine? etc
abrown has quit [Remote host closed the connection]
<simpson> astronavt: Besides the ones at https://www.pypy.org/download.html ?
<simpson> I imagine that all the usual excuses apply; Windows isn't exactly an easy-to-target platform for Free Software.
<astronavt> "What is missing for a full 64-bit translation
<astronavt> " presumably
thenewandy_ has joined #pypy
thenewandy_ has left #pypy [#pypy]
<simpson> Yeah, Win64 has quite the ABI. Somehow even crazier than Win32.
igitoor has quit [*.net *.split]
nedbat has quit [*.net *.split]
awygle has quit [*.net *.split]
thenewandy has joined #pypy
<Alex_Gaynor> I mean, the only thing that's crazy about it from pypy's perspective is that `sizeof(long) != sizeof(void *)`
<thenewandy> hi. If I run: "import ctypes; ctypes.CDLL(None)" in pypy (7.1.1 windows 32-bit binary downloaded today)
<thenewandy> then the interpreter exits without any messages
<thenewandy> I was expecting an exception to be thrown. can anyone else reproduce this?
<thenewandy> (I'm on a corporate machine which has some garbage software running on it which can make things behave stupidly - so this may not be a pypy bug)
agates[m] has joined #pypy
edd[m] has joined #pypy
nedbat has joined #pypy
awygle has joined #pypy
igitoor has joined #pypy
<mattip> thenewandy: which binary - python 2.7 or 3.6? What version of windows?
<thenewandy> 2.7. windows 10
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/4821 [Andy Lawrence: force build, winconsoleio]
<mattip> astronavt: there is a branch, but not a high priority, see the windowsinstaller branch (last touched in Feb 2019)
<astronavt> mattip thanks. i wont pretend like i have the expertise to contribute though :(
<mattip> thenewandy: I get OSError: Cannot load library <None>: The parameter is incorrect
<mattip> windows 10, 2.7
<thenewandy> ok great, thanks. I'll pester my IT department and see if they can take off the crud
<mattip> what do you get on CPython? or if you just try to open a non-existant file 'open("doesnotexist.txt")' ?
<thenewandy> TypeError: expected string or Unicode object, NoneType found
<thenewandy> trying to open a non-existant file in pypy gives: "IOError: [Errno 2] No such file or directory: 'asdfaSD'"
<mattip> so something is off with that particular pypy. It doesn't print anything (try it in a DOS window)?
<thenewandy> correct
<mattip> weird
<thenewandy> the same thing happened with a colleague, who also has the corporate garbage
<thenewandy> if it does turn out to be the corporate garbage, then I would consider this to be a feature, as I will use this as a reason to have said garbage removed
<mattip> does it work correctly on an actual dll?
<thenewandy> yes
<thenewandy> >>>> ctypes.CDLL("c:\pypy\pypy2.7-v7.1.1-win32\libpypy-c.dll")
<thenewandy> <CDLL 'c:\pypy\pypy2.7-v7.1.1-win32\libpypy-c.dll', handle 10000000 at 4f63ed0>
<thenewandy> and it also fails gracefully on a non-existent dll
<mattip> underneath it is calling the windows api function LoadLibrary
<mattip> None should be translated to NULL so it is as if in C you tried LoadLibrary(NULL)
<thenewandy> ok. let me try a stupid C program that does that
<mattip> it should return NULL on failure
<thenewandy> printf("%p\n", (void*)LoadLibrary(NULL));
<thenewandy> just prints 0x00000...
<thenewandy> I guess I might be able to build pypy myself and see if I can watch it in a debugger
<mattip> ok, thanks for checking. Something is strange. Let me check on another machine (I was checking on the machine that builds the package)
<thenewandy> ok - and please don't invest too much in this, in case it is the corporate garbage - it is software that hooks into all system calls from everythig
<thenewandy> and has been known to have really stupid bugs (on macOS it was making global initialization functions in shared libraries run multiple times)
<mattip> yeah, works fine on another machine. Strange. It would be nice to have a simple reproducer in C.
<mattip> cuz running a debugger on pypy is probably not going to fly
<thenewandy> well, I've just done it on the binary
<thenewandy> and the stack trace is promising
<thenewandy> the crash is in "ctiuser.dll"
<thenewandy> which apparently is part of "Carbon Black" which is the corporate AV
<thenewandy> not the garbage I was expecting, but a different piece of corporate garbage
<mattip> ahh, nice. Can you use some strace equivalent to see how we are calling it differently than when you call it from the simple C program?
<thenewandy> I'll try... I don't typically use windows much, so I'll have to do a bit of digging to find it
<thenewandy> Exception thrown at 0x70872DB3 (ctiuser.dll) in pypy.exe: 0xC0000005: Access violation reading location 0x00000000.
<thenewandy> that is the exception in case you are interested...
<mattip> I wonder how the C program gets around that
<thenewandy> my two best guesses are:
<thenewandy> 1) AV heuristics decided different checks were needed in the two cases
<thenewandy> 2) My program was whitelisted because the AV is super slow and people complained, so somehow it could tell that this was a program I built
<mattip> hard for us to fix either of those cases from our end
<mattip> let us know if there is something we can do
<mattip> maybe we should detect NULL and not even try on windows ...
<thenewandy> I don't think you should do anything - the bug seems to be in someone else's software