Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miniparrot SEGV on Windows 7 with MSVC #1190

Closed
jnthn opened this issue Jan 24, 2015 · 6 comments
Closed

miniparrot SEGV on Windows 7 with MSVC #1190

jnthn opened this issue Jan 24, 2015 · 6 comments

Comments

@jnthn
Copy link
Contributor

jnthn commented Jan 24, 2015

Trying to build the tagged RELEASE_7_0_1 gives:

.\miniparrot.exe -Iruntime\parrot\include config_lib.pir > runtime\parrot\include\config.fpmc
NMAKE : fatal error U1077: '.\miniparrot.exe' : return code '0xc0000005'

Did the usual make realclean, git clean -fdx, and so forth. Nothing unusual otherwise, except perhaps that I configured with --debugging to get debug symbols.

@rurban
Copy link
Member

rurban commented Jan 24, 2015

64bit only.
Justed tested ok with gcc on cygwin64 and mingw64. I'll have to install msvc now.
Cannot get msvc yet working on win64

vcvarsall x86_amd64
perl Configure.pl --cc=cl --ld=link --link=link --cxx=cl

to override most of the wrong strawberry perl mingw64 settings.

@rurban
Copy link
Member

rurban commented Jan 25, 2015

Got msvc 17 now working...

@rurban
Copy link
Member

rurban commented Jan 25, 2015

The exception happens in Parrot_NativePCCMethod_invoke
at the nci method call of Parrot_IMCCompiler_nci_compile_file

With mingw gdb I get the segv at

Starting program: /usr/src/parrot/win64/miniparrot.exe -Iruntime/parrot/include config_lib.pir
[New Thread 3548.0xd2c]

Program received signal SIGSEGV, Segmentation fault.
0x000000009c44b930 in ?? ()
(gdb) bt
#0  0x000000009c44b930 in ?? ()
#1  0x000007fe9c45536b in libparrot!Parrot_Pointer_ro_update_vtable ()
   from /usr/src/parrot/win64/libparrot.dll
#2  0x0000000000000001 in ?? ()
#3  0x000007fe9c346671 in libparrot!Parrot_Pointer_ro_update_vtable ()
   from /usr/src/parrot/win64/libparrot.dll
#4  0x000000c771b2b2b0 in ?? ()
#5  0x000000c771a14d20 in ?? ()
#6  0x0000000000000000 in ?? ()

@rurban
Copy link
Member

rurban commented Jan 25, 2015

It failed in 6.11.0 already, kinda bisecting now.

I needed to patch env for the removed access to the _environ global.

@rurban
Copy link
Member

rurban commented Jan 26, 2015

891dd90 broke win64 msvc on all nci calls, i.e. 6.11.0.

-#define D2FPTR(x) UINTVAL2PTR(funcptr_t, PTR2UINTVAL(x))
-#define F2DPTR(x) UINTVAL2PTR(void *, PTR2UINTVAL((funcptr_t) (x)))
+#define D2FPTR(x) UINTVAL2PTR(funcptr_t, PTR2ULONG(x))
+#define F2DPTR(x) UINTVAL2PTR(void *, PTR2ULONG((funcptr_t) (x)))

of course, on win64 msvc long is only 4 bytes!!

rurban pushed a commit that referenced this issue Jan 26, 2015
rurban pushed a commit that referenced this issue Jan 26, 2015
rurban pushed a commit that referenced this issue Jan 27, 2015
rurban pushed a commit that referenced this issue Jan 27, 2015
On win64 with msvc the size of long is 4.
Broken with 6.11.0
Closes GH #1190
@rurban
Copy link
Member

rurban commented Jan 27, 2015

Pushed to master. Not sure yet if we should do a 7.0.2 hotfix for this.

On my win64 msvc system environ access is also broken, which would require smoke-me/env-gh1191
@jnthn: Can you please confirm --gen-parrot=master works for you on win64/msvc?

@rurban rurban closed this as completed Jan 27, 2015
@rurban rurban added this to the 7.0.2 milestone Jan 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants