Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Add -leakdetection switch to output mem-leaks to the console

#33

In order to have automated build testing done we need to be able to detect memory leaks from the builder. A switch should be added so that when the executable is called mem leak information will go to either stderr or stdout so the test tool can capture and report it.

Reported by Thell Fowler · January 28th, 2010 @ 08:51 PM

State: resolved
Milestone: v2.0.0
Assigned to: nobody

Activity

  1. Thell Fowler
    Thell Fowler
    • Milestone set to v2.0.0
    • Tag set to memory leak
    • State changed from new to open
    • Assigned user set to Thell Fowler

    January 28th, 2010 @ 08:52 PM

  2. Thell Fowler
    Thell Fowler

    (from [3861077429252ca67565bc9793abc72375545079]) winmain: add console switch for leak detection

    • Add the '-leakdetect' switch to allow for console debugger memory leak detection and app exit for build testing.

    [#33] http://github.com/almostautomated/npp-community/commit/386107742925...

    January 29th, 2010 @ 05:45 AM

  3. Thell Fowler
    Thell Fowler

    (from [0a64ed54c3dde6e99e70f28c9ee8f5ba599765fb]) winmain: add console switch for leak detection

    • Add the '-leakdetect' switch to allow for console debugger memory leak detection and app exit for build testing.

    [#33] http://github.com/almostautomated/npp-community/commit/0a64ed54c3dd...

    January 29th, 2010 @ 05:51 PM

  4. Thell Fowler
    Thell Fowler
    • State changed from open to needs_ack

    January 29th, 2010 @ 05:52 PM

  5. Thell Fowler
    Thell Fowler

    (from [b7e0890f5d93c26afbd2d8426e3e919bb15ac48b]) winmain: add console switch for leak detection

    • Add the '-leakdetect' switch to allow for console debugger memory leak detection and app exit for build testing.
    • Fix winmain.cpp leading spaces to tabs

    [#33] http://github.com/almostautomated/npp-community/commit/b7e0890f5d93...

    January 29th, 2010 @ 06:52 PM

  6. Thell Fowler
    Thell Fowler
    • Assigned user changed from Thell Fowler to npp-community

    January 29th, 2010 @ 06:56 PM

  7. Thell Fowler
    Thell Fowler

    (from [22f01256987124e26921ff29e7ce4c761ebefc8c]) winmain: add console switch for leak detection

    • Add the '-leakdetect' switch to allow for console debugger memory leak detection and app exit for build testing.
    • Fix winmain.cpp leading spaces to tabs

    [#33] http://github.com/almostautomated/npp-community/commit/22f012569871...

    February 3rd, 2010 @ 03:46 AM

  8. Thell Fowler
    Thell Fowler

    (from [e7a01c48278cd64c92c36ed7df15298a2f6dca3c]) NPPCR-HUDSON-BUILD-TESTS.bat: add leakdetect switch

    • This patch makes use of the NPPCR leakdetect switch to enable auto exit after notepad_plus initializes and emits the NPPN_READY msg so that we can get a more accurate memory leak detection check.

    • This patch is on top of patches from [#33]

    [#25] http://github.com/almostautomated/npp-community/commit/e7a01c48278c...

    February 3rd, 2010 @ 03:46 AM

  9. Jocelyn Legault
    Jocelyn Legault
    • State changed from needs_ack to acked

    This one looks good. However, didn't we discuss we should deal with a few messages in the message pump before exiting? Did you encounter problems in that regard?

    Also:
    - Since you put the -leakdetect flag in between #ifdef _DEBUG, we should put the -unittests flag in between #ifndef SHIPPING, but that should probably be the subject of a disting ticket. - I don't have anything against fixing whitespaces when it's problematic, but changing tabs to spaces or vice versa is rather pointless IMO. It's also rather bad when on tries to review changes in a branch and sees tons of modifications that have nothing to do with the main topic of the branch. I would have expected that from the biggest proponent of topic branches! :-p

    February 5th, 2010 @ 04:48 AM

  10. Thell Fowler
    Thell Fowler

    (from [363433bf3f22e1d78373dd805777b8d6fd7f0d8e]) NPPCR-HUDSON-BUILD-TESTS.bat: add leakdetect switch

    • This patch makes use of the NPPCR leakdetect switch to enable auto exit after notepad_plus initializes and emits the NPPN_READY msg so that we can get a more accurate memory leak detection check.

    • This patch is on top of patches from [#33]

    [#25]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/363433bf3f22...

    February 5th, 2010 @ 08:57 PM

  11. Thell Fowler
    Thell Fowler

    (from [72514699b5e30b0928e7af0f55cb8021f52a66b5]) NPPCR-HUDSON-BUILD-TESTS.bat: add leakdetect switch

    • This patch makes use of the NPPCR leakdetect switch to enable auto exit after notepad_plus initializes and emits the NPPN_READY msg so that we can get a more accurate memory leak detection check.

    • This patch is on top of patches from [#33]

    [#25]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/72514699b5e3...

    February 7th, 2010 @ 10:59 PM

  12. Thell Fowler
    Thell Fowler

    This one looks good. However, didn't we discuss we should deal with a few messages in the message pump before exiting? Did you encounter problems in that regard?

    All of the init messages are dealt with, including file ops, etc. I watched the messages that go by after the init completes and didn't see anything of interest as it almost immediately goes to an idle after the init.

    Also: - Since you put the -leakdetect flag in between #ifdef _DEBUG, we should put the -unittests flag in between #ifndef SHIPPING, but that should probably be the subject of a disting ticket.

    -unittests are in an ifndef SHIPPING already.

    February 7th, 2010 @ 11:18 PM

  13. Thell Fowler
    Thell Fowler

    BTW - your absolutly correct, that the whitespace fixes should be a commit of their own, still on the same topic branch though, with a [trivial] marker.

    I'll fix that up prior to putting on pu.

    February 7th, 2010 @ 11:21 PM

  14. Jocelyn Legault
    Jocelyn Legault

    -unittests are in an ifndef SHIPPING already.

    The code that deals with it is. The declaration of the command line switch. See winmain.cpp, line 153

    February 8th, 2010 @ 04:38 AM

  15. Thell Fowler
    Thell Fowler

    (from [aac98d60bc6390e317e32b7ad8778ffb41f50dc6]) NPPCR-HUDSON-BUILD-TESTS.bat: add leakdetect switch

    • This patch makes use of the NPPCR leakdetect switch to enable auto exit after notepad_plus initializes and emits the NPPN_READY msg so that we can get a more accurate memory leak detection check.

    • This patch is on top of patches from [#33]

    [#25]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/almostautomated/npp-community/commit/aac98d60bc63...

    February 8th, 2010 @ 07:19 PM

  16. Thell Fowler
    Thell Fowler

    (from [81d2d97dc3dde491c3df23c290237b219baeb097]) winmain.cpp: [trivial] add SHIPPING config check

    • unittests flag is only valid for debug and release build, the code block was in a preprocessor if block, but the MACRO definition was not.

    [#33]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/npp-community/npp-community/commit/81d2d97dc3dde4...

    February 14th, 2010 @ 05:19 PM

  17. Thell Fowler
    Thell Fowler

    (from [b9ac49bbb55071af8d1f167a4438d9b43a4bfef3]) winmain.cpp: add console switch for leak detection

    • Add the '-leakdetect' switch to allow for console debugger memory leak detection and app exit for build testing.

    [#33]

    Signed-off-by: Thell Fowler git@tbfowler.name
    http://github.com/npp-community/npp-community/commit/b9ac49bbb55071...

    February 14th, 2010 @ 05:19 PM

  18. Thell Fowler
    Thell Fowler
    • State changed from acked to proposed

    February 14th, 2010 @ 05:20 PM

  19. Thell Fowler
    Thell Fowler
    • Assigned user cleared.
    • State changed from proposed to resolved

    Promoted to master

    Changeset [64e3218b2a847ccd34ede53a60fff112f47e0051] by Thell Fowler

    February 26th, 2010 @ 03:04 PM

    Merge branch 'tf/LH-33/add-leakdetect-switch'

    • tf/LH-33/add-leakdetect-switch: winmain.cpp: add console switch for leak detection
    • winmain.cpp: [trivial] add SHIPPING config check
    • winmain.cpp: [trivial] whitespace cleanup

    http://github.com/npp-community/npp-community/commit/64e3218b2a847c...

    Committed by Thell Fowler

    February 26th, 2010 @ 03:53 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.