MMIX Bug Report Umlaut |
||
Content
|
MMIXware Versionmmix-20110831Bug ReportedInitial: 30/1/2013AuthorMartin RuckertDescriptionmmixal considers symbols containing character codes greater than 127 as undefined.DetailsThe following MMIX programpâté IS $0 Main SET pâté,0produces the following error messages: umlaut.mms", line 2: X field is undefined! (One error was found.)The bug is hidden in the function trie_search, where tt->ch, an unsigned short, is compared to *p, a char, like this while (*p!=tt->ch) {and set like this tt->ch=*p++;A char might be (depending on the compiler) a signed or an unsigned quantity. In the first case 'â' < 0 in the later 'â' > 0x7F. In the first case *p will not compare correctly to tt->ch. Proposed PatchIn mmixal.w in the function trie_search replaceregister Char *p=s;by register unsigned char *p=(unsigned char *)s;and terminator=p;@+return tt;by terminator=(Char*)p;@+return tt; DiscussionThe patch as given above is now part of the sources. |
Please help to keep this site up to date! If you want to point out important material or projects that are not listed here, if you find errors or want to suggest improvements, please send email to