Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #28745 > unrolled thread

crash

Started bymhx@iae.nl
First post2014-02-24 08:01 -0800
Last post2014-03-04 16:57 -0500
Articles 11 — 7 participants

Back to article view | Back to comp.lang.forth


Contents

  crash mhx@iae.nl - 2014-02-24 08:01 -0800
    Re: crash Hans Bezemer <the.beez.speaks@gmail.com> - 2014-02-24 17:56 +0100
      Re: crash Hans Bezemer <the.beez.speaks@gmail.com> - 2014-02-24 18:22 +0100
        Re: crash "Alex McDonald" <blog@rivadpm.com> - 2014-02-24 23:16 +0000
          Re: crash Hans Bezemer <the.beez.speaks@gmail.com> - 2014-02-25 14:31 +0100
            Re: crash "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-25 17:46 -0500
              Re: crash George Hubert <georgeahubert@yahoo.co.uk> - 2014-03-02 11:46 -0800
                Re: crash Bernd Paysan <bernd.paysan@gmx.de> - 2014-03-04 01:01 +0100
                  Re: crash "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-03-03 19:20 -0500
                    Re: crash Bernd Paysan <bernd.paysan@gmx.de> - 2014-03-04 18:57 +0100
                      Re: crash "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-03-04 16:57 -0500

#28745 — crash

Frommhx@iae.nl
Date2014-02-24 08:01 -0800
Subjectcrash
Message-ID<c8e230e4-6438-4031-88ce-5ac54a47cd3d@googlegroups.com>
Somebody mentioned http://thebeez.home.xs4all.nl/4tH/crash.htm.
These things have to be rechecked now and then.

-- ------------------------------------------------------
\ Find a value not likely to be an execution token.
1 ALIGNED CONSTANT NotAnXT 
\ Find an address likely to be outside the data space.
-4 ALIGNED CONSTANT NotADataAddress 
\ Find an address which is likely to be unaligned.
HERE ALIGNED 1+ CONSTANT NotAligned
\ Create a : word which cannot be a macro.
: _DROP DROP ;

: BadExecute ( -- ) NotAnXT EXECUTE ;
: BadAddress ( -- ) NotADataAddress @ DROP ;
: BadAlign ( -- ) NotAligned @ DROP ;
: BadReturn ( -- ) NotAnXT >R ;
: BadCode ( -- ) ['] _DROP 20 0 FILL 0 ['] _DROP EXECUTE ; \ Try executing it
: BadRes1 ( -- n1 n2 ) 9 0 /MOD ; \ Divide by zero
: BadRes2 ( -- ) 0 1 1 UM/MOD ; \ Out of range
: BadBreak ( -- u1 u2 ) BEGIN AGAIN ; \ Try to interrupt loop
: BadNumb ( -- ) 1 1 BASE ! . ; \ Loops forever?
-- ----------------

Results with | 
Compiler     | Bad Execute | Bad Address | Bad Align | Bad Return | Bad Code | Bad Res1 | Bad Res2 | Bad Break | Bad Numb 
iForth 5.0   |     -2      |     0       |     0     |     -2     |  -6 (1)  |    0 (2) |    -4    |   -14 (3) |    -2     
4th v3.5a    |     -2      |    -2       |     0     |     -2     |   0      |   -2     |    -6    |   -14     |    -2  

Remark 1: returns with two numbers on the stack. What is the "correct response?"
Remark 2: iForth can't compile this code (exception at compile time). Technically 
          this could be called result code 0 :-)
Remark 3: Results on Linux should be much better.

-marcel

[toc] | [next] | [standalone]


#28748

FromHans Bezemer <the.beez.speaks@gmail.com>
Date2014-02-24 17:56 +0100
Message-ID<530b79a4$0$2907$e4fe514c@news2.news.xs4all.nl>
In reply to#28745
mhx@iae.nl wrote:

> Somebody mentioned http://thebeez.home.xs4all.nl/4tH/crash.htm.
> These things have to be rechecked now and then.
 
> Results with |
> Compiler     | Bad Execute | Bad Address | Bad Align | Bad Return | Bad
> Code | Bad Res1 | Bad Res2 | Bad Break | Bad Numb iForth 5.0   |     -2   
>   |     0       |     0     |     -2     |  -6 (1)  |    0 (2) |    -4   
> |   -14 (3) |    -2 4th v3.5a    |     -2      |    -2       |     0     |
>     -2     |   0      |   -2     |    -6    |   -14     |    -2
> 
> Remark 1: returns with two numbers on the stack. What is the "correct
> response?" Remark 2: iForth can't compile this code (exception at compile
> time). Technically this could be called result code 0 :-)
> Remark 3: Results on Linux should be much better.

True. I promise to add/modify the results on my site. This is for 4tH
3.62.2:

habe@linux-471m:~/4th.dev> pp4th -x bad.4th
OK
badexecute
Signal -4
OK
badaddress
Signal -8
OK
badalign
Signal -8
OK
badreturn
Signal -4
OK
badcode
OK
badres1
Signal -10
OK
badres2
OK
badnum
badnum? OK
badnumb
Signal -17
OK
badbreak
^C
habe@linux-471m:~/4th.dev>

Hans Bezemer

[toc] | [prev] | [next] | [standalone]


#28749

FromHans Bezemer <the.beez.speaks@gmail.com>
Date2014-02-24 18:22 +0100
Message-ID<530b7fc7$0$2830$e4fe514c@news2.news.xs4all.nl>
In reply to#28748
Hans Bezemer wrote:

Here's gforth. I leave interpreting the results to the makers.

Gforth 0.7.2, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
 \ Find a value not likely to be an execution token.  ok
1 ALIGNED CONSTANT NotAnXT  ok
\ Find an address likely to be outside the data space.  ok
-4 ALIGNED CONSTANT NotADataAddress  ok
\ Find an address which is likely to be unaligned.  ok
HERE ALIGNED 1+ CONSTANT NotAligned  ok
\ Create a : word which cannot be a macro.  ok
: _DROP DROP ;  ok
  ok
: BadExecute ( -- ) NotAnXT EXECUTE ;  ok
: BadAddress ( -- ) NotADataAddress @ DROP ;  ok
: BadAlign ( -- ) NotAligned @ DROP ;  ok
: BadReturn ( -- ) NotAnXT >R ;  ok
: BadCode ( -- ) ['] _DROP 20 0 FILL 0 ['] _DROP EXECUTE ; \ Try executing
it  ok
: BadRes1 ( -- n1 n2 ) 9 0 /MOD ; \ Divide by zero  ok
: BadRes2 ( -- ) 0 1 1 UM/MOD ; \ Out of range  ok
: BadBreak ( -- u1 u2 ) BEGIN AGAIN ; \ Try to interrupt loop  ok
: BadNumb ( -- ) 1 1 BASE ! . ; \ Loops forever?  ok
  ok
badexecute
:20: Invalid memory address
>>>badexecute<<<
Backtrace:
$B7A4B5E4 execute
badaddress
:21: Invalid memory address
>>>badaddress<<<
Backtrace:
$B7A4B614 @
badalign  ok
badreturn
:23: Invalid memory address
>>>badreturn<<<
Backtrace:
$B7A4B678 ;s
badcode
:24: Invalid memory address
>>>badcode<<<
Backtrace:
$B7A4B6C0 execute
badres1
:25: Division by zero
>>>badres1<<<
Backtrace:
$B7A4B6F4 /mod
badres2
:26: Division by zero
>>>badres2<<<
Backtrace:
$B7A4B72C um/mod
badnumb
:27: Pictured numeric ouput string overflow
>>>badnumb<<<
Backtrace:
$B7A1A284 throw
$B7A1A470 hold
$B7A1A490 #
$B7A1A4E0 #s
$0
$B7A1A5F8 d.r
$B7A1A658 d.
$B7A4B794 .
  ok
badbreak
:29: User interrupt
>>>badbreak<<<
Backtrace:
$B7A4B74C branch
                              
Hans Bezemer

[toc] | [prev] | [next] | [standalone]


#28757

From"Alex McDonald" <blog@rivadpm.com>
Date2014-02-24 23:16 +0000
Message-ID<legjrq$5q7$1@dont-email.me>
In reply to#28749
on 24/02/2014 17:22:24, Hans Bezemer wrote:
> Hans Bezemer wrote:
> 
> Here's gforth. I leave interpreting the results to the makers.
> 
> Gforth 0.7.2, Copyright (C) 1995-2008 Free Software Foundation, Inc.
> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
> Type `bye' to exit
> \ Find a value not likely to be an execution token.  ok
> 1 ALIGNED CONSTANT NotAnXT  ok
> \ Find an address likely to be outside the data space.  ok
> -4 ALIGNED CONSTANT NotADataAddress  ok
> \ Find an address which is likely to be unaligned.  ok
> HERE ALIGNED 1+ CONSTANT NotAligned  ok
> \ Create a : word which cannot be a macro.  ok
>: _DROP DROP ;  ok
> ok
>: BadExecute ( -- ) NotAnXT EXECUTE ;  ok
>: BadAddress ( -- ) NotADataAddress @ DROP ;  ok
>: BadAlign ( -- ) NotAligned @ DROP ;  ok
>: BadReturn ( -- ) NotAnXT >R ;  ok
>: BadCode ( -- ) ['] _DROP 20 0 FILL 0 ['] _DROP EXECUTE ; \ Try executing
> it  ok
>: BadRes1 ( -- n1 n2 ) 9 0 /MOD ; \ Divide by zero  ok
>: BadRes2 ( -- ) 0 1 1 UM/MOD ; \ Out of range  ok
>: BadBreak ( -- u1 u2 ) BEGIN AGAIN ; \ Try to interrupt loop  ok
>: BadNumb ( -- ) 1 1 BASE ! . ; \ Loops forever?  ok
> ok
> badexecute
>:20: Invalid memory address
>>>>badexecute<<<
> Backtrace:
> $B7A4B5E4 execute
> badaddress
>:21: Invalid memory address
>>>>badaddress<<<
> Backtrace:
> $B7A4B614 @
> badalign  ok
> badreturn
>:23: Invalid memory address
>>>>badreturn<<<
> Backtrace:
> $B7A4B678 ;s
> badcode
>:24: Invalid memory address
>>>>badcode<<<
> Backtrace:
> $B7A4B6C0 execute
> badres1
>:25: Division by zero
>>>>badres1<<<
> Backtrace:
> $B7A4B6F4 /mod
> badres2
>:26: Division by zero
>>>>badres2<<<
> Backtrace:
> $B7A4B72C um/mod
> badnumb
>:27: Pictured numeric ouput string overflow
>>>>badnumb<<<
> Backtrace:
> $B7A1A284 throw
> $B7A1A470 hold
> $B7A1A490 #
> $B7A1A4E0 #s
> $0
> $B7A1A5F8 d.r
> $B7A1A658 d.
> $B7A4B794 .
> ok
> badbreak
>:29: User interrupt
>>>>badbreak<<<
> Backtrace:
> $B7A4B74C branch
> 
> Hans Bezemer
> 
> 

W32F 

badexecute
^^^^^^^^^^
Error -9 badexecute invalid memory address in (console)
badaddress
^^^^^^^^^^
Error -9 badaddress invalid memory address in (console)
badalign  ok
badreturn
^^^^^^^^^
Error -9 badreturn invalid memory address in (console)
badcode
^^^^^^^
Error -9 badcode invalid memory address in (console)
badres1
^^^^^^^
Error -10 badres1 division by zero in (console)
badres2
^^^^^^^
exception $C0000095 int overflow
Error 9998 badres2 Windows exception trapped in (console)
badnumb 10000000000000000000000000    

0000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000

00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000

00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000
000000000000000000000000000000000000000000000000000000000000000000  ok

badbreak not tested.

[toc] | [prev] | [next] | [standalone]


#28775

FromHans Bezemer <the.beez.speaks@gmail.com>
Date2014-02-25 14:31 +0100
Message-ID<530c9b43$0$2960$e4fe514c@news2.news.xs4all.nl>
In reply to#28757
Alex McDonald wrote:

I'd prefer people would add their codes and comments, like Marcel did,
before adding results.

Hans Bezemer

[toc] | [prev] | [next] | [standalone]


#28777

From"Rod Pemberton" <dont_use_email@xnohavenotit.cnm>
Date2014-02-25 17:46 -0500
Message-ID<op.xbuz7mmo5zc71u@localhost>
In reply to#28775
On Tue, 25 Feb 2014 08:31:57 -0500, Hans Bezemer  
<the.beez.speaks@gmail.com> wrote:

> I'd prefer people would add their codes and comments, like Marcel did,
> before adding results.

These are probably not the latest versions of these Forths.  Also, the
data should be confirmed by someone else prior to use.  If you use this
data, I'd prefer to *not* have my name placed on the webpage.

Compiler           | Bad Execute | Bad Address | Bad Align | Bad Return |  
Bad Code | Bad Res1 | Bad Res2 | Bad Break | Bad Numb
bigForth 2.4.0     |     -18     |     -2      |      0    |     -18     
|   -7(1)  |   -2     |    -2    |     -16   |     0
Gforth 0.7.0 ITC   |      -2     |     -2      |      0    |      -2     
|   -7(1)  |   -2     |    -2    |     -2    |    -2
Win32Forth 6.14.02 |      -2(2)  |     -2(2)   |      0    |      -2(2)  
|   -2(2)  |   -2(2)  |    -2(2) |     -16   |    -6(3)

Remark 1:
   a) result code -7 plus reports location, or result code -2 plus empties  
dictionary
   b) also - WORDS did not display the dictionary but BYE worked - so other  
words might too
Remark 2: result code -2 plus continues at another prompt prior to  
returning to Forth prompt
Remark 3: not an infinite loop - prints one, then loops for a while  
printing zeroes, but stops

If the messages printed any diagnostic information other than the error
message, I assumed it was result code -2 and not result code -3.  I'm not
sure how to test for result code -20.

It's interesting to note that bigForth appeared to worked correctly for
the BadNumb test.  It displayed '1' and stopped.  Of course, it has two
hard system lockups ...

NOTE: Win32Forth hangs consistently, after the second use of WORDS ...

    e.g.,  BadAddress .S WORDS BadAddress .S WORDS <--hangs
    e.g.,  BadReturn .S WORDS BadReturn .S WORDS <--hangs
    etc.


Rod Pemberton

[toc] | [prev] | [next] | [standalone]


#28863

FromGeorge Hubert <georgeahubert@yahoo.co.uk>
Date2014-03-02 11:46 -0800
Message-ID<cebf3a2d-c481-41f5-a693-bf1b94cba477@googlegroups.com>
In reply to#28777
On Tuesday, February 25, 2014 10:46:24 PM UTC, Rod Pemberton wrote:


> 
> 
> It's interesting to note that bigForth appeared to worked correctly for
> 
> the BadNumb test.  It displayed '1' and stopped.  Of course, it has two
> 
> hard system lockups ...
> 
> 

> Rod Pemberton

Actually since base isn't in the range 2-36 then it's an ambiguous condition so all forths are correct.


--  
============================================== 
George A. Hubert   georgeahu...t@gmail.com 
By George of Cirencester
Web design and Software Consultancy
Mob: +44 (0)7923-416754 
web: http://www.bygeorgeofcirencester.co.uk
==============================================

[toc] | [prev] | [next] | [standalone]


#28885

FromBernd Paysan <bernd.paysan@gmx.de>
Date2014-03-04 01:01 +0100
Message-ID<lf355f$lgb$1@online.de>
In reply to#28863
George Hubert wrote:

> On Tuesday, February 25, 2014 10:46:24 PM UTC, Rod Pemberton wrote:
> 
> 
>> 
>> 
>> It's interesting to note that bigForth appeared to worked correctly for
>> 
>> the BadNumb test.  It displayed '1' and stopped.  Of course, it has two
>> 
>> hard system lockups ...
>> 
>> 
> 
>> Rod Pemberton
> 
> Actually since base isn't in the range 2-36 then it's an ambiguous
> condition so all forths are correct.

And what were the hard system lockups?  You can ctrl-C bigForth just fine 
(you can't ctrl-C xbigforth in the X window, because ctrl-C-ing only works 
from the console, but ctrl-C in the starting console works just fine).

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

[toc] | [prev] | [next] | [standalone]


#28889

From"Rod Pemberton" <dont_use_email@xnothavet.cqm>
Date2014-03-03 19:20 -0500
Message-ID<op.xb58k5y26zenlw@localhost>
In reply to#28885
On Mon, 03 Mar 2014 19:01:50 -0500, Bernd Paysan <bernd.paysan@gmx.de>  
wrote:
> George Hubert wrote:
>> On Tuesday, February 25, 2014 10:46:24 PM UTC, Rod Pemberton wrote:

>>> It's interesting to note that bigForth appeared to worked correctly for
>>> the BadNumb test.  It displayed '1' and stopped.  Of course, it has two
>>> hard system lockups ...
>>
>> Actually since base isn't in the range 2-36 then it's an ambiguous
>> condition so all forths are correct.
>
> And what were the hard system lockups?  You can ctrl-C bigForth just fine
> (you can't ctrl-C xbigforth in the X window, because ctrl-C-ing only
> works from the console, but ctrl-C in the starting console works just  
> fine).
>

This was for Windows SE.

BadExecute and BadReturn for bigForth causes a total and complete
system lockup.  The only way out was to power down.  I.e.,

No ability to break out via Ctrl-C.
No response from GUI.
No response from the OS.
No ability to use keyboard.
No ability to use mouse.
No ability to terminate bigForth or any other application.
etc.


Rod Pemberton
PS  Someone may need to reply to this for Bernd to see this...

[toc] | [prev] | [next] | [standalone]


#28908

FromBernd Paysan <bernd.paysan@gmx.de>
Date2014-03-04 18:57 +0100
Message-ID<lf545d$hq7$1@online.de>
In reply to#28889
Rod Pemberton wrote:
> This was for Windows SE.

Ok, that explains it ;-).

> BadExecute and BadReturn for bigForth causes a total and complete
> system lockup.  The only way out was to power down.  I.e.,
> 
> No ability to break out via Ctrl-C.
> No response from GUI.
> No response from the OS.
> No ability to use keyboard.
> No ability to use mouse.
> No ability to terminate bigForth or any other application.
> etc.

Sounds like a typical Windows worst-edition-ever experience.

> Rod Pemberton
> PS  Someone may need to reply to this for Bernd to see this...

If you ask things that actually may be useful, I can check for your 
responses.  However, you managed to make even this one useless.  This 
operating system is dead, and it deserves any killer bug ;-).

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

[toc] | [prev] | [next] | [standalone]


#28911

From"Rod Pemberton" <dont_use_email@xnothavet.cqm>
Date2014-03-04 16:57 -0500
Message-ID<op.xb7wlsvb6zenlw@localhost>
In reply to#28908
On Tue, 04 Mar 2014 12:57:01 -0500, Bernd Paysan <bernd.paysan@gmx.de>  
wrote:
> Rod Pemberton wrote:

>> PS  Someone may need to reply to this for Bernd to see this...
>
> If you ask things that actually may be useful, I can check for your
> responses.  However, you managed to make even this one useless.  This
> operating system is dead, and it deserves any killer bug ;-).
>

The Kernelex project is keeping it alive for a while longer, but, yes,
even I've converted to Linux.  I can't get certain hardware drivers.

Anyway, Forth is dead too.  So, what is your rationalization for why
you put so much effort into it?  Forth being dead and all ...  ;-)


Rod Pemberton

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.forth


csiph-web