Opened 8 years ago

Closed 6 years ago

#2103 closed defect (fixed)

[kean] change error_code in recursive_query_unittest_3.cc

Reported by: fdupont Owned by: kean
Priority: high Milestone: Sprint-20131015
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: Medium
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 2 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

in src/lib/resolve/tests/recursive_query_unittest_3.cc:

error_code -> asio::error_code

cf. the attachment for the fix.

Subtickets

Attachments (1)

recursive_query_unittest_3.cc.diff (2.6 KB) - added by fdupont 8 years ago.
error_code -> asio::error_code fix

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by fdupont

error_code -> asio::error_code fix

comment:1 Changed 8 years ago by shane

  • Milestone changed from New Tasks to Next-Sprint-Proposed

comment:2 Changed 8 years ago by shane

  • Estimated Difficulty changed from 0 to 2

comment:3 Changed 6 years ago by shane

  • Milestone set to Sprint-20131015
  • Summary changed from free error_code in recursive_query_unittest_3.cc to [kean] free error_code in recursive_query_unittest_3.cc

comment:4 Changed 6 years ago by kean

  • Owner set to kean
  • Status changed from new to accepted

comment:5 Changed 6 years ago by kean

  • Owner changed from kean to UnAssigned
  • Status changed from accepted to reviewing
==28832== 
==28832== HEAP SUMMARY:
==28832==     in use at exit: 4 bytes in 1 blocks
==28832==   total heap usage: 25,875 allocs, 25,874 frees, 27,178,083 bytes allocated
==28832== 
==28832== Searching for pointers to 1 not-freed blocks
==28832== Checked 463,032 bytes
==28832== 
==28832== LEAK SUMMARY:
==28832==    definitely lost: 0 bytes in 0 blocks
==28832==    indirectly lost: 0 bytes in 0 blocks
==28832==      possibly lost: 0 bytes in 0 blocks
==28832==    still reachable: 4 bytes in 1 blocks
==28832==         suppressed: 0 bytes in 0 blocks
==28832== Rerun with --leak-check=full to see details of leaked memory
==28832== 
==28832== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
--28832-- 
--28832-- used_suppression:      2 glibc-2.5.x-on-SUSE-10.2-(PPC)-2a
==28832== 
==28832== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)

This after applying the attached patch. No user visible changes so no ChangeLog? required.

comment:6 Changed 6 years ago by muks

  • Owner changed from UnAssigned to kean

What was the leak? I am not able to see it by looking at the patch.

You have included Valgrind log to show that there is no leak after applying the patch, and the ticket also talks about "free"-ing something. What needs to be freed?

comment:7 Changed 6 years ago by kean

  • Owner changed from kean to muks
  • Summary changed from [kean] free error_code in recursive_query_unittest_3.cc to [kean] change error_code in recursive_query_unittest_3.cc

valgrind doesn't report a leak the old way either. I think the word "free" in the title is misleading. However all other code uses asio::error_code so at the very least this is warranted for consistency. The description says to change error_code to asio::error_code, I wouldn't attach too much importance to the word "free" in the title. Nowhere in the bug does it imply a leak (other than that 1 word). Since it is misleading changing that word to "change" since that is what both the description and the patch file indicate is appropriate.

comment:8 Changed 6 years ago by muks

  • Owner changed from muks to kean

Given what is said above, the patch is ok to be merged.

The patch was written by Francis Dupont (see git log for a author string). When you commit this patch, please use git commit --author="" to set him as the author and you as the committer.

comment:9 Changed 6 years ago by kean

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.