Skip to content

CefPostDataElement.setToBytes() with an empty file name hits CEF's own CHECK() (post_data_element_impl.cc) #28

Description

@Thrameos

Summary

java/tests/junittests/CefPostDataTest.java has one @Disabled test
exercising an empty file-name edge case for CefPostDataElement.setToBytes()
(or the related file-backed post-data path) that hits a real CHECK()
failure inside CEF's own post_data_element_impl.cc, in the Debug/coverage
build -- same broad category as issues #19/#20/#21 (CEF's own CHECK/DCHECK
firing on malformed input that Release builds silently tolerate).

Reproduction

java/tests/junittests/CefPostDataTest.java, the @Disabled test annotated
"Real CEF CHECK() failure on empty file name (post_data_element_...)".

Impact

This specific edge case of native/CefPostDataElement_N.cpp stays untested.

Activity

  1. Thrameos commented on Sep 1, 2026

    @Thrameos
    OwnerAuthor

    Fixed in commit 92aed53 (branch coverage/phase1-value-objects-phase2-handlers).

    native/CefPostDataElement_N.cpp's N_SetToFile now guards against an empty file name before calling into CEF (matching the guard N_SetURL/N_SetHeaderByName already had for #20/#21), so setToFile("") is now a genuine no-op instead of hitting CEF's CHECK(!fileName.empty()).

    Same commit also extended the identical guard pattern to CefRequest.setMethod()/.set() and CefResponse.setHeaderByName() — the same bug class, other call sites that had never been individually filed.

    Validated with a new minimum pure-C++ repro (tools_native/null_param_repro/, no JNI/JVM/JUnit) rather than the full JUnit suite alone, since the Debug/coverage build turned out to have several other, unrelated pre-existing crashes stacked on top of each other that made a full-suite pass/fail unreliable as the sole signal. elementSetToEmptyFilePathLeavesElementEmpty is re-enabled and passing in the full suite (3 repeated Release runs, no crash).

    Closing.

  2. added a commit that references this issue on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions