Menu

#426 A single suppressed line in a IF masks all following lines

v1.1.x
fixed
None
v1.1.1
Bug Fix
2019-01-26
2018-12-18
Erik Hänel
No

If one uses a semicolon in a if flow control statement, then all following lines in that block are masked as well.

Analysis:

The issue is resolved simple: it's a undefined behavior for the loop mask flag. If the current command was not parsed yet but it does not end with a semicolon, the loop mask flag stays in its previous state, which is in this case equal to true.

Implementation:

  • Implementation: The flag is now set to false, if the current line does not end with an ;.
  • Revision: [r447]
  • Implementation test: The erroneous flow control statement was executed without any deviations.

Documentation:

  • ChangesLog: updated
  • Comments: Not needed
  • Documentation articles: Not needed
  • Language files: Not needed

Tests:

Fix was added to the automatic tests. No deviations occured. Bug fix implemented successfully.

Related

Commit: [r447]

Discussion

  • Erik Hänel

    Erik Hänel - 2018-12-18
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-12-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,18 @@
     If one uses a semicolon in a `if` flow control statement, then all following lines in that block are masked as well.
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* ChangesLog: (*Have you updated the changes log?*)
    +* Comments: (*Have you written comments in the code, which describe your change?*)
    +* Documentation articles: (*Have you updated the documentation articles?*)
    +* Language files: (*Have you updated the language files?*)
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2018-12-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,7 @@
     If one uses a semicolon in a `if` flow control statement, then all following lines in that block are masked as well.
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +The issue is resolved simple: it's a undefined behavior for the loop mask flag. If the current command was not parsed yet but it does not end with a semicolon, the loop mask flag stays in its previous state, which is in this case equal to `true`.
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2018-12-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,15 +4,15 @@
     The issue is resolved simple: it's a undefined behavior for the loop mask flag. If the current command was not parsed yet but it does not end with a semicolon, the loop mask flag stays in its previous state, which is in this case equal to `true`.
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: The flag is now set to `false`, if the current line does not end with an `;`.
    +* Revision: [r447]
    +* Implementation test: The erroneous flow control statement was executed without any deviations.
    
     ###Documentation:
    -* ChangesLog: (*Have you updated the changes log?*)
    -* Comments: (*Have you written comments in the code, which describe your change?*)
    -* Documentation articles: (*Have you updated the documentation articles?*)
    -* Language files: (*Have you updated the language files?*)
    +* ChangesLog: updated
    +* Comments: Not needed
    +* Documentation articles: Not needed
    +* Language files: Not needed
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r447]

  • Erik Hänel

    Erik Hänel - 2019-01-26
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -15,4 +15,4 @@
    
     * Language files: Not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +Fix was added to the automatic tests. No deviations occured. Bug fix implemented successfully.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB