Skip to content

Dgud/wx/fixes/otp 20335 - #11530

Open
dgud wants to merge 17 commits into
erlang:maintfrom
dgud:dgud/wx/fixes/OTP-20335
Open

Dgud/wx/fixes/otp 20335#11530
dgud wants to merge 17 commits into
erlang:maintfrom
dgud:dgud/wx/fixes/OTP-20335

Conversation

@dgud

@dgud dgud commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Fix validated findings from two scanner passes (Erlang src + C/C++ c_src)
and rewrite the OpenGL doc generator to produce inline -doc attributes.

dgud added 17 commits August 20, 2026 15:10
Gracefully handle stopping wx.
Shouldn't really happen if application behaves.
Handle problem if application have stopped wx, but still registers an
connect.
Was buggy for multiple uses
Returning hibernate from a callback caused a crash.

Fix copy paste docs.

Fix {shutdown, R} as a normal exit, i.e. no logging.
Cache init_opengl

Debug printout removal

Removed dead code.
Fix error cases
And other badarg checks
The test was wrong and the thread was always woken,
this might be cause issues if things is not working as expected.
PageInfo was wrong, andalso fixes memory leaks in case of other errors.
Fix several code generation bugs in wx_gen_nif.erl, wxapi.conf, and
hand-written templates:

- Fix clientData list iteration storing the whole list instead of
  per-element terms (wxeErlTerm(argv[N]) -> wxeErlTerm(Head))
- Fix wxPrintout:new title argument silently dropped (missing
  assignment and semicolon in template)
- Fix STC raw-getter use-after-free: store wxCharBuffer in local
  before calling .data() on the temporary
- Fix wxImage malloc return unchecked before memcpy
- Fix EwxListCtrl default constructor leaving me_ref uninitialized
- Fix EwxGLContext destructor not cleaning up glc map entries
- Fix wxWindow:screenToClient/1 passing uninitialized coords to
  wxWidgets (add both annotation matching clientToScreen)
- Fix wxImage GetData/GetAlpha int overflow on large images by
  casting size computation to size_t
- Fix SetFieldsCount OOB read when widths list length != number
  (added pre_hook validation)
- Fix userData leak in wxEvtHandler connect when eventType is invalid
- Move !This null check before argument decoding to prevent leaking
  heap-allocated term arguments (wxETreeItemData, wxeErlTerm)
- Remove spurious copyright block from wx_extra/wx_misc.erl template
OpenGL have not been generated in long time, still generated Xml docs,
and erldoc commetns, update generator to work as expected with newer
inline docs.
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

  2 files   17 suites   4m 11s ⏱️
160 tests 153 ✅ 7 💤 0 ❌
176 runs  169 ✅ 7 💤 0 ❌

Results for commit 65bd749.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant