[DISMISSED] Asm Test Crashes with FBSL_TINY in 64bit

(Bug Reports and Alerts)

[DISMISSED] Asm Test Crashes with FBSL_TINY in 64bit

Unread postby Stefan Schnell » Sat Sep 07, 2013 7:18 am

Hello community,

I test the program Asm_Abs.fbs in different Windows environments, which means Windows 7 32bit and 64bit. With FBSL.exe all works well, but Fbsl_Tiny.exe crashes in 64bit environment. As attachment the error and the protocol file.

Cheers
Stefan
Attachments
Fbsl_Tiny_64bit_Crash.JPG
Fbsl_Tiny_64bit_Crash.JPG (101.67 KiB) Viewed 2493 times
Fbsl_Tiny_64bit_Crash.txt.zip
(3.29 KiB) Downloaded 151 times
Visit my homepage
or meet me at XING or at the SCN
User avatar
Stefan Schnell
FBSL geek
FBSL geek
 
Posts: 132
Joined: Thu Aug 22, 2013 7:48 am
Location: Germany - Oberirsen

Re: Asm Test Crashes with FBSL_TINY in 64bit environment

Unread postby Stefan Schnell » Sat Sep 07, 2013 10:22 am

Hello community,

to compensate this behavior, I include the Is64WOW method into FBSLX.
Look at the example here.
If it runs in 64bit environment I use Fbsl.exe, otherwise Fbsl_Tiny.exe. On this way it works perfect. :D

Cheers
Stefan
Visit my homepage
or meet me at XING or at the SCN
User avatar
Stefan Schnell
FBSL geek
FBSL geek
 
Posts: 132
Joined: Thu Aug 22, 2013 7:48 am
Location: Germany - Oberirsen

Re: Asm Test Crashes with FBSL_TINY in 64bit environment

Unread postby Mike Lobanovsky » Sun Sep 08, 2013 11:47 am

Stefan Schnell wrote:... If it runs in 64bit environment I use Fbsl.exe, otherwise Fbsl_Tiny.exe. On this way it works perfect. :D ...

If you like this solution then use it. But it should not be so. Please look through my post below.
Mike
"Я старый солдат, мадам, и не знаю слов любви."
"I am an old soldier, ma'am, and I don't know the words of love."
"Je suis un vieux soldat, madame, et je ne connais pas les mots d'amour."
"Ich bin ein alter Soldat, gnädige Frau, und ich weiß nicht die Worte der Liebe."

__________________________________________________________________________________________________________________________________________________
(3.2GHz i5 Core Quad, 8GB RAM / 2 x nVidia GTX 550Ti SLI-bridged, 2GB VRAM)
(x86 Win XP Pro Russian Sp3/x86 Win Vista Ultimate Sp2/x64 Win 7 Ultimate Sp1/Wine in x64 elementaryOS Luna)
User avatar
Mike Lobanovsky
FBSL Administrator
FBSL Administrator
 
Posts: 1823
Joined: Tue Apr 19, 2005 8:22 am
Location: Republic of Belarus

Re: [DISMISSED] Asm Test Crashes with FBSL_TINY in 64bit

Unread postby Mike Lobanovsky » Sun Sep 08, 2013 12:37 pm

Hello Stefan,

Stefan Schnell wrote:... Fbsl_Tiny.exe crashes in 64bit environment. ...

I will take the liberty to state that your declaration does not correspond to reality. At least, I could not reproduce your error report on my platforms.

These are my results under 64-bit Windows 7 for the MsgBox() version of the script with Fbsl_Tiny.exe v3.4.10 and v3.5:

x64Win7_MsgBox.png
x64Win7_MsgBox.png (44.91 KiB) Viewed 2483 times

and these ones, for the console version of the same:

x64Win7_Console.png
x64Win7_Console.png (81.9 KiB) Viewed 2483 times


And here is the script that I used:
Code: Select all
' ======================================
' Example implementation of branchless
' integer Abs() in Dynamic Assembler
' ======================================

#AppType Console ' comment out for MsgBox() mode
#Option Strict
#EscapeChars On

' Integer values only!
Dim A As Integer = -1234567890

Printf("The absolute value of A (=%d) is %d\n", A, AsmAbs(A)) ' comment out for MsgBox() mode
//MsgBox(NULL, "The absolute value of A which equals " & A & " is " & _ ' uncomment for MsgBox() mode
//   AsmAbs(A), "AsmAbs function", 0)
Pause

Asm AsmAbs(InValue As Integer) As Integer // DynAsm in v3.5
   enter 0, 0
   
   mov eax, [ebp + 8] // InValue instead of [ebp+8] in v3.5
   
   mov edx, eax   ' Abs function proper
   sar edx, 31   ' compiles to 9 bytes
   xor eax, edx   ' without branching
   sub eax, edx   ' so it is very fast
   
   leave
   ret
End Asm // DynAsm in v3.5


Failure to run FBSL v3.4.10 Dynamic Assembler in your 64-bit environment may be caused by your DEP (Data Execution Prevention) service being switched on. You must be logged on as Administrator to be able to switch it off prior to executing FBSL v3.4.10 Dynamic Assembler scripts.

Matter is, Dynamic Asembler block sections compiled to machine code are executed outside of FBSL virtual machine's code marked as EXECUTABLE by the GCC compiler at the FBSL source project's compile time. FBSL v3.4.10 does not mark its Asm sections explicitly as EXECUTABLE code on script load so Windows will refuse to run it if DEP is switched on.

OTOH FBSL v3.5 marks its DynAsm and DynC code sections as EXECUTABLE, READABLE, WRITABLE on script load so the execution runs unhindered regardless of current DEP settings on your machine.

So please make sure your DEP is switched off on any 32- or 64-bit XP/Vista/7/8 machine for as long as you continue experimenting with the v3.4.10 environment. If that doesn't help, your x64 installation may simply be broken. I do not know of any other cause why your 64-bit Windows 7 may fail. Anyway, you are the first FBSL user ever to report FBSL's Dynamic Assembler crashes in a 64-bit environment. I am sorry but I am inclined to consider the bug non-existent and to dismiss the whole subject.

As an afterthought, can I also ask you to make a copy of your 32-bit MSVCRT.DLL from your Windows 7 installation and PM it to me for testing? I have occasionally come across incompatible versions of this library on some locale-specific Windows installations.
Mike
"Я старый солдат, мадам, и не знаю слов любви."
"I am an old soldier, ma'am, and I don't know the words of love."
"Je suis un vieux soldat, madame, et je ne connais pas les mots d'amour."
"Ich bin ein alter Soldat, gnädige Frau, und ich weiß nicht die Worte der Liebe."

__________________________________________________________________________________________________________________________________________________
(3.2GHz i5 Core Quad, 8GB RAM / 2 x nVidia GTX 550Ti SLI-bridged, 2GB VRAM)
(x86 Win XP Pro Russian Sp3/x86 Win Vista Ultimate Sp2/x64 Win 7 Ultimate Sp1/Wine in x64 elementaryOS Luna)
User avatar
Mike Lobanovsky
FBSL Administrator
FBSL Administrator
 
Posts: 1823
Joined: Tue Apr 19, 2005 8:22 am
Location: Republic of Belarus

Re: Asm Test Crashes with FBSL_TINY in 64bit environment

Unread postby Stefan Schnell » Mon Sep 09, 2013 10:51 pm

Hello Mike,

thanks for the hint, I disable the DEP and now all works well.

Cheers
Stefan
Visit my homepage
or meet me at XING or at the SCN
User avatar
Stefan Schnell
FBSL geek
FBSL geek
 
Posts: 132
Joined: Thu Aug 22, 2013 7:48 am
Location: Germany - Oberirsen

Re: Asm Test Crashes with FBSL_TINY in 64bit environment

Unread postby Mike Lobanovsky » Mon Sep 09, 2013 11:45 pm

Glad to hear that and thanks for the feedback, Stefan.

Then I'm dismissing this bug report as a false alarm. :)
Mike
"Я старый солдат, мадам, и не знаю слов любви."
"I am an old soldier, ma'am, and I don't know the words of love."
"Je suis un vieux soldat, madame, et je ne connais pas les mots d'amour."
"Ich bin ein alter Soldat, gnädige Frau, und ich weiß nicht die Worte der Liebe."

__________________________________________________________________________________________________________________________________________________
(3.2GHz i5 Core Quad, 8GB RAM / 2 x nVidia GTX 550Ti SLI-bridged, 2GB VRAM)
(x86 Win XP Pro Russian Sp3/x86 Win Vista Ultimate Sp2/x64 Win 7 Ultimate Sp1/Wine in x64 elementaryOS Luna)
User avatar
Mike Lobanovsky
FBSL Administrator
FBSL Administrator
 
Posts: 1823
Joined: Tue Apr 19, 2005 8:22 am
Location: Republic of Belarus


Return to FBSL v3 Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron