Skip to content

Odin: fix memory leak in c simple print function #1393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2020

Conversation

emacdo12
Copy link
Contributor

@emacdo12 emacdo12 commented Jul 3, 2020

Description

Changed the function so it makes sure there are enough characters to have an octal number because it caused a memory leak before.

Related Issue

Issue 1339

Motivation and Context

Remedies memory leak

How Has This Been Tested?

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

…g for octal number, it checks that there are enough characters first. Also, added a line to check for indexing case where the

index is the same as start which prints the whole line the function (for some reason).
@probot-autolabeler probot-autolabeler bot added lang-cpp C/C++ code lang-hdl Hardware Description Language (Verilog/VHDL) Odin Odin II Logic Synthesis Tool: Unsorted item tests labels Jul 3, 2020
@jeanlego jeanlego changed the title ast_util.cpp:c_simple_print Odin: fix memory leak in c simple print function Jul 3, 2020
@jeanlego jeanlego merged commit 9ff7158 into verilog-to-routing:master Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-cpp C/C++ code lang-hdl Hardware Description Language (Verilog/VHDL) Odin Odin II Logic Synthesis Tool: Unsorted item tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants