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


Groups > de.comp.sys.atari > #688

Re: Thing 1.50

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Christian Zietz <newsgroup.1001@chz.xyz>
Newsgroups de.comp.sys.atari
Subject Re: Thing 1.50
Date Sat, 19 Dec 2015 19:40:14 +0100
Lines 56
Message-ID <ddlmkhFhdacU1@mid.individual.net> (permalink)
References <ddkvo4FbhkiU1@mid.individual.net> <201512191836.a62267@b.maus.de>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 8bit
X-Trace individual.net GnqO7dSPcGuzVIlWXetpsgt1M7ftYuxgADffY+s79/n3mP/g==
Cancel-Lock sha1:HxxtyGRzZkQxc/OacHVV3KJOd1c=
X-Enigmail-Draft-Status N1110
User-Agent Mozilla/5.0 (Windows NT 6.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
In-Reply-To <201512191836.a62267@b.maus.de>
Xref csiph.com de.comp.sys.atari:688

Show key headers only | View raw


Gerhard Stoll schrieb:

> int Getcookie (long cookie, long *p_value)
>
> 		/* Ssystem supported, use it */
> 		int	r;
> 		long	v = -42;

[...]		

> 		r = (int) Ssystem(S_GETCOOKIE, cookie, &v);
> 		/*
> 		 * Backward compatibility for MiNT 1.14.7:
> 		 * Ssystems() returns cookie value and ignores arg2!!
> 		 */
> 		if (r != -1 && v == -42)				
> 			v = r;

[...]

> 		if (p_value)
> 			*p_value = v;



> Ich sehe da keinen Fehler und bei mir geht es ja.

Ich sehe einen möglichen Fehler -- der auch zum im Forum berichteten
Absturz passt -- im Code-Pfad "Backward compatibility for MiNT 1.14.7".
Offenbar ist "int" nur 16 Bit breit und damit wird der Cookie (32 Bit)
in diesem Fall nicht komplett ausgelesen.

Code aus THING.APP:

0004C8E8 lea (sp),a0       ; arg2
0004C8EA move.l d3,d1      ; arg1
0004C8EC moveq #8,d0       ; S_GETCOOKIE
0004C8EE jsr sub_508A8     ; Ssystem
0004C8F4 cmp.w #-1,d0
0004C8F8 beq.s loc_4C906
0004C8FA moveq #-42,d1
0004C8FC cmp.l (sp),d1
0004C8FE bne.s loc_4C906
0004C900 move.w d0,d2      ; <--- nur 16 Bit des Rückgabewerts...
0004C902 ext.l d2          ; <--- ... werden abgelegt
0004C904 move.l d2,(sp)

Der berichtete Absturz äußerte sich in der Tat so, dass die unteren 16
Bit des Cookies wohl korrekt gelesen wurden, die oberen 16 Bit (aufgrund
von "sign extension") aber 0xFFFF waren.

Christian
-- 
Christian Zietz  -  CHZ-Soft  -  czietz (at) gmx.net
WWW: http://www.chzsoft.de/
PGP/GnuPG-Key-ID: 0x52CB97F66DA025CA / 0x6DA025CA

Back to de.comp.sys.atari | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Thing 1.50 Gerhard_Stoll@b.maus.de (Gerhard Stoll) - 2015-12-07 14:27 +0100
  Re: Thing 1.50 Arno Welzel <usenet@arnowelzel.de> - 2015-12-08 12:44 +0100
    Re: Thing 1.50 Thomas Binder <usenet_2015-12@baernet.net> - 2015-12-09 20:47 +0100
      Re: Thing 1.50 Gerhard_Stoll@b.maus.de (Gerhard Stoll) - 2015-12-11 09:54 +0100
        Re: Thing 1.50 Arno Welzel <usenet@arnowelzel.de> - 2015-12-12 18:40 +0100
          Re: Thing 1.50 Gerhard_Stoll@b.maus.de (Gerhard Stoll) - 2015-12-18 13:01 +0100
        Re: Thing 1.50 Thomas Binder <usenet_2015-12@baernet.net> - 2015-12-14 00:22 +0100
    Re: Thing 1.50 Gerhard_Stoll@b.maus.de (Gerhard Stoll) - 2015-12-11 09:54 +0100
  Re: Thing 1.50 Update 1 Gerhard_Stoll@b.maus.de (Gerhard Stoll) - 2015-12-11 09:49 +0100
    Re: Thing 1.50 Update 2 Gerhard_Stoll@b.maus.de (Gerhard Stoll) - 2015-12-20 15:25 +0100
  Re: Thing 1.50 Mathias Wittau <wittau@lnxnt.org> - 2015-12-17 00:00 +0100
    Re: Thing 1.50 Gerhard_Stoll@b.maus.de (Gerhard Stoll) - 2015-12-19 13:13 +0100
      Re: Thing 1.50 Th.me@thomas-heier.de (Thomas Heier) - 2015-12-19 17:16 +0100
        Re: MagiC Mac X (war: Thing 1.50) Gerhard_Stoll@b.maus.de (Gerhard Stoll) - 2015-12-20 15:18 +0100
  Re: Thing 1.50 Christian Zietz <newsgroup.1001@chz.xyz> - 2015-12-19 13:09 +0100
    Re: Thing 1.50 Gerhard_Stoll@b.maus.de (Gerhard Stoll) - 2015-12-19 18:36 +0100
      Re: Thing 1.50 Christian Zietz <newsgroup.1001@chz.xyz> - 2015-12-19 19:40 +0100
        Re: Thing 1.50 Gerhard_Stoll@b.maus.de (Gerhard Stoll) - 2015-12-20 15:20 +0100

csiph-web