Small memory leak in get_stack_bounds // os::create_stack_guard_pages

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • hs21
    • Affects Version/s: hs20
    • Component/s: hotspot
    • None
    • b09
    • generic
    • generic
    • Verified

        Valgrind reports small memory leak in get_stack_bounds // os::create_stack_guard_pages.

        The reason there is leak is that getline() may return -1 and still allocate memory in str:

            ssize_t len = getline(&str, &dummy, f);
            if (len == -1) {
              fclose(f);
              return false;

              Assignee:
              Dmitriy Samersoff
              Reporter:
              Nicolay Haustov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: