[8.5.2] AbtCLangParser evaluating undefined token results in stack overflow

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[8.5.2] AbtCLangParser evaluating undefined token results in stack overflow

Richard Sargent
Administrator
A file with the following content produces a stack overflow as String and Number keep handing off to the other for the comparison. (This may mean that the String and Number comparison methods need to be rationalized to be consistent.)

#if UNDEF >= 1
    #define ERROR UNDEF should have been treated as zero in the comparison
#endif

As I read the C Preprocessor rules, this is intended to evaluate as if UNDEF were defined with the value 0. Instead, it compares 'UNDEF' >= 1.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [8.5.2] AbtCLangParser evaluating undefined token results in stack overflow

dmacq
Created case 53161

On Thursday, November 14, 2013 1:13:12 PM UTC-5, Richard Sargent wrote:
A file with the following content produces a stack overflow as String and Number keep handing off to the other for the comparison. (This may mean that the String and Number comparison methods need to be rationalized to be consistent.)

#if UNDEF >= 1
    #define ERROR UNDEF should have been treated as zero in the comparison
#endif

As I read the C Preprocessor rules, this is intended to evaluate as if UNDEF were defined with the value 0. Instead, it compares 'UNDEF' >= 1.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [8.5.2] AbtCLangParser evaluating undefined token results in stack overflow

Richard Sargent
Administrator
For this particular case, you may want to revisit the comparison implementations in the String and Number hierarchies. If I remember correctly, they have opposite implementations in terms of which methods are defined in terms of others. I think this is what allows the evaluation of 'something' < 1 to result in a stack overflow, independently of the C Preprocessor functionality.


On Wed, Dec 18, 2013 at 2:54 PM, Donald MacQueen <[hidden email]> wrote:
Created case 53161

On Thursday, November 14, 2013 1:13:12 PM UTC-5, Richard Sargent wrote:
A file with the following content produces a stack overflow as String and Number keep handing off to the other for the comparison. (This may mean that the String and Number comparison methods need to be rationalized to be consistent.)

#if UNDEF >= 1
    #define ERROR UNDEF should have been treated as zero in the comparison
#endif

As I read the C Preprocessor rules, this is intended to evaluate as if UNDEF were defined with the value 0. Instead, it compares 'UNDEF' >= 1.

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/va-smalltalk/juylbFWm2XI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.



--
Richard Sargent
Business Development Manager
503-766-4719
[hidden email]
GemTalk Systems
15220 NW Greenbrier Parkway #240
Beaverton, OR 97006

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/groups/opt_out.