Skip to content

Merge changes requires to get 3DMM building on VC++2.1 ontop of WIndows 11#3

Open
NCommander wants to merge 7 commits into
foone:mainfrom
NCommander:main
Open

Merge changes requires to get 3DMM building on VC++2.1 ontop of WIndows 11#3
NCommander wants to merge 7 commits into
foone:mainfrom
NCommander:main

Conversation

@NCommander
Copy link
Copy Markdown

No description provided.

Disable SETBLD target in makefiles, fix paths in UTEST.RC,
and modify toplevel makefile to include a missing variable

Signed-off-by: Michael Casadevall <michael@casadevall.pro>
Signed-off-by: Michael Casadevall <michael@casadevall.pro>
Signed-off-by: Michael Casadevall <michael@casadevall.pro>
Signed-off-by: Michael Casadevall <michael@casadevall.pro>
Signed-off-by: Michael Casadevall <michael@casadevall.pro>
Signed-off-by: Michael Casadevall <michael@casadevall.pro>
Signed-off-by: Michael Casadevall <michael@casadevall.pro>
foone pushed a commit that referenced this pull request May 30, 2022
🔨 Add target_chomp_sources to allow for generating chk files

This is currently barely working, and there are clearly some issues with
regards to the preprocessor. 😔


Fix TargetChompSources and clean up CHTs (#4)
Fix target_chomp_sources and clean up CHTs

This patches up some of the accidental misspells in the
TargetChompSources CMake script and moves the IN_80386 and WIN
preprocessor defines to COMPILE_DEFINITIONS, as the CHT files require it
for some Mac / Windows differences.
The CHT files have also been cleaned up, so they shouldn't report any
preprocessor warnings anymore.


Signed-off-by: bjrkk <cfxqpkjq@gmail.com>
Signed-off-by: Izzy Muerte <63051+bruxisma@users.noreply.github.com>
Co-authored-by: björk <61477479+bjrkk@users.noreply.github.com>
willbr pushed a commit to willbr/3dmm-research that referenced this pull request May 2, 2026
ThumbnailDescriptor's union aliased (grfontMask, grfont) and (ctg, chid)
onto (tag.ctg, tag.cno) so font-browser and chid-browser code paths could
reuse the same storage as a plain TAG-pointing thumbnail. That alias was
load-bearing -- BrowserContentList::_FAddGokdToThd writes via
tag.{ctg,cno} and reads back via grfontMask/grfont, asserting they match.

The union assumed TAG was 16 bytes ([sid:4][pcrf:4][ctg:4][cno:4]). On
x64 TAG grew to 24 bytes (pcrf is an 8-byte pointer plus 4 bytes of
alignment padding before it), so the original 8-byte preamble of two long
fillers put grfontMask at offset 8 -- which on x64 is *inside* tag.pcrf.
The alias shifted off (ctg, cno) and writes through grfontMask corrupted
the pcrf pointer instead. Clicking the Scene Choices button (kidSettings-
Browser, hid 0x20042) repro'd as Run-Time Check Failure foone#3 -- variable
'thd' is being used without being initialized -- and downstream as
"Font style browser broken" assertion at browser.cpp:1682.

Pad the alternate union members with three additional longs on x64 so
grfontMask lands at offset 16 and grfont at offset 20, matching tag.ctg
and tag.cno. Add static_asserts using offsetof to guard against future
TAG layout drift.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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