Project

General

Profile

Actions

Bug #17811

closed

fix nasty random generation failure

Added by Gaëtan POBLON almost 4 years ago. Updated almost 4 years ago.

Status:
Released
Priority:
N/A
Category:
rudderc
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:

Description

Generation of a technique in rudder-lang randomly failed for no obvious reason.

After investigation it appeared that this bug were exposed by a duplicate variable declaration located in the rudder-lang library.

The bug was hidden in a recursive function whose purpose was to generate the context tree (which is very important to register variables and their relative namespaces).

Duplicates weren't detected properly (recursion had flow flaws), and when they were (if the duplicate was the first entry of the context tree hashmap) it led to a crash.

Investigating this, I noticed another issue: namespaces weren't push right, ie:
```
sys.arch.linux
sys.arch.windows
```
Would led to
Context { arch { windows } }

instead of:
Context { arch { linux, windows } }

Now program behaves properly:
- warns the user when a duplicate is declared
- properly generates the tree regardless of its elements order
- properly pushes nested content
- added tests unit

Actions #1

Updated by Gaëtan POBLON almost 4 years ago

  • Description updated (diff)
  • Status changed from Pending technical review to In progress
Actions #2

Updated by Gaëtan POBLON almost 4 years ago

  • Description updated (diff)
Actions #3

Updated by Gaëtan POBLON almost 4 years ago

  • Description updated (diff)
Actions #4

Updated by Gaëtan POBLON almost 4 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Gaëtan POBLON to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder/pull/3098
Actions #5

Updated by Anonymous almost 4 years ago

  • Status changed from Pending technical review to Pending release
Actions #6

Updated by Gaëtan POBLON almost 4 years ago

  • Fix check changed from To do to Checked
Actions #7

Updated by Vincent MEMBRÉ almost 4 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.1.1 which was released today.

Actions

Also available in: Atom PDF