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

4_filehandle.t segfaults on Win32 #7

Open
hoelzro opened this issue Oct 18, 2014 · 5 comments
Open

4_filehandle.t segfaults on Win32 #7

hoelzro opened this issue Oct 18, 2014 · 5 comments
Labels

Comments

@hoelzro
Copy link
Owner

hoelzro commented Oct 18, 2014

See also #6

@hoelzro hoelzro added the bug label Oct 18, 2014
@hoelzro
Copy link
Owner Author

hoelzro commented Oct 18, 2014

Paging @rns

@rns
Copy link
Contributor

rns commented Oct 19, 2014

I run 4_filehandle.t, here are some results — not much, sorry, if I can do more, feel free to ask. :)

It segfaults on either of calls to lua functions

write_file($fh, "foo", "bar", "baz");
$fh = get_fh($file);

Below is all diagnostics from nmake

Please specify prototyping behavior for Lua.xs (see perlxs manual)
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
cp lib/Inline/Lua.pm blib\lib\Inline\Lua.pm
AutoSplitting blib\lib\Inline\Lua.pm (blib\lib\auto\Inline\Lua)
Running Mkbootstrap for Inline::Lua ()
    C:\perl-5.20.1\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Lua.bs
    C:\perl-5.20.1\bin\perl.exe C:\perl-5.20.1\lib\ExtUtils\xsubpp  -typemap C:\perl-5.20.1\lib\ExtUtils\typemap -typemap typemap  Lua.xs > Lua.xsc && C:\perl-5.20.1\bin\perl.exe -MExtUtils::Command -e mv -- Lua.xsc Lua.c
    cl -c  -I. "-IC:\Program Files\Lua\5.1\include"  -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -O1 -MD -Zi -DNDEBUG -GL    -DVERSION=\"0.10\"  -DXS_VERSION=\"0.10\"  "-IC:\perl-5.20.1\lib\CORE"   Lua.c
Lua.c
Lua.xs(335) : warning C4244: 'initializing' : conversion from 'lua_Number' to 'int', possible loss of data
Lua.xs(572) : warning C4101: 'ref' : unreferenced local variable
    C:\perl-5.20.1\bin\perl.exe -MExtUtils::Mksymlists  -e "Mksymlists('NAME'=>\"Inline::Lua\", 'DLBASE' => 'Lua', 'DL_FUNCS' => {  }, 'FUNCLIST' => [], 'IMPORTS' => {  }, 'DL_VARS' => []);"
    link -out:blib\arch\auto\Inline\Lua\Lua.dll -dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg  -libpath:"c:\perl-5.20.1\lib\CORE"  -machine:x86 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" Lua.obj   C:\perl-5.20.1\lib\CORE\perl520.lib "C:\Program Files\Lua\5.1\lib\lua5.1.lib" "C:\Program Files\Microsoft Visual Studio 10.0\VC\\lib\oldnames.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\kernel32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\user32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\gdi32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\winspool.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\comdlg32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\advapi32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\shell32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\ole32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\oleaut32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\netapi32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\uuid.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\ws2_32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\mpr.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\winmm.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\version.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\odbc32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\odbccp32.lib" "C:\Program Files\Microsoft SDKs\Windows\v7.0A\lib\comctl32.lib" "C:\Program Files\Microsoft Visual Studio 10.0\VC\\lib\msvcrt.lib" -def:Lua.def
   Creating library blib\arch\auto\Inline\Lua\Lua.lib and object blib\arch\auto\Inline\Lua\Lua.exp
Generating code
c:\projects\inline-lua-0.10\lua.xs(256) : warning C4715: 'luaval_to_perl' : not all control paths return a value
Finished generating code
    if exist blib\arch\auto\Inline\Lua\Lua.dll.manifest mt -nologo -manifest blib\arch\auto\Inline\Lua\Lua.dll.manifest -outputresource:blib\arch\auto\Inline\Lua\Lua.dll;2
    if exist blib\arch\auto\Inline\Lua\Lua.dll.manifest del blib\arch\auto\Inline\Lua\Lua.dll.manifest
    C:\perl-5.20.1\bin\perl.exe -MExtUtils::Command -e chmod -- 755 blib\arch\auto\Inline\Lua\Lua.dll

Hope it helps.

The lua I run is Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio from here.

@rns
Copy link
Contributor

rns commented Oct 20, 2014

Just thought you can release the module disabling that test file under win32 and documenting that file handles don't work on win32, patches welcome — perhaps that could help. The module works for me under win32 otherwise.

@hoelzro
Copy link
Owner Author

hoelzro commented Nov 5, 2014

@rns Which version of Perl for Windows are you using? I tried to see if I could help diagnose what's wrong with this test on Windows, but I pretty much got as far as installing Strawberry Perl.

@rns
Copy link
Contributor

rns commented Nov 5, 2014

perl 5.20.1 compiled with with visual studio express 2010 (msc
16.00.40219.01). Update: under windows xp sp3, which may or may not be a problem per se. :)

On Wed, Nov 5, 2014 at 2:02 AM, Rob Hoelz notifications@github.com wrote:

@rns https://github.com/rns Which version of Perl for Windows are you
using? I tried to see if I could help diagnose what's wrong with this test
on Windows, but I pretty much got as far as installing Strawberry Perl.


Reply to this email directly or view it on GitHub
#7 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants