Repository navigation
Feat: Find function addresses by reflection: live class tables, command ids and known callers - #227
Merged
Merged
Conversation
…a second views table lines the slot up alike
…rom the window's live views
…ser's command switch
…e of its fingerprint places
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NFR-6 and D16: find function addresses by reflection, from public Chromium source, for builds made without a PDB (Edge 157.0.4341.60). Every place still needs two methods to agree, or a structural check. A value that is not cross checked keeps its feature off.
Paths
row_resolve): a new method, its slot shift. Every views class table keepsviews::View's slots (ui/views/view.h). So when a second views class table, known in both builds, lines the same slot up by the same shift, the slot number is found a second time, apart from the first table.chromium/live_tables.rs): reads the class tables of the liveBrowserView, its frame view (a child of the browser view's parent named*FrameView*, perNonClientView), theWindowsCaptionButtonviews and theCustomFloatingCornerviews. The first word of a live view is its class table. A table counts only when all views of the class share it and it lies in read-only data with code in its first slot. It must agree with the row's table, and a row without a table takes the live one.layout.frame_vtable,frame.frame_view_vtable(same table),caption_vtable,corner_vtableandbrowser_view_view_vtableat runtime. Also the virtual functions in their slots (top_inset,caption_paint,caption_size,corner_paint,client_view_bounds,layout) once the tables are known in both builds.row_command.rs). Reads the jump table switches of the build (HandleCommandWithDisposition'sswitch (id)inbrowser_command_controller.cc). Takes the first call of the case for the public id. The prior build must send the id to the prior row's NewTab through switches with the same lowest case, and every such switch in the new build must name one function. Cross checked with the fingerprint's places, including places off the exception table's function starts. Settlestabs.new_tab.row_resolve, a known caller). A function known in both builds calls the target in the prior build. Of the fingerprint's places, its new body calls exactly one. Each slot settled in path 1 is a known caller in the next round. Settlesdraw_color(from the frame'sOnPaint), andset_radius,stack_at_topandset_layerwhere a settled caller calls them and their fingerprint matched somewhere.No reflection path yet
hwnd_for_view,browser_view_for_window,toolbar.widget_for_window: free or static functions. No virtual slot and no command reaches them.tabs.tab_at,get_group,get_tab_model,active_web_contents,navigation.open_url: no public command id runs them first.active_web_contentsandopen_urlare not virtual on a views class.set_layerandtop_inset: their fingerprint matched no place. The known caller method needs fingerprint places, so they rely on the table slot path or stay with the existing methods.Tests
nfr6_a_virtual_function_is_read_from_its_views_class_table_by_slot,nfr6_a_virtual_function_needs_a_second_views_table_to_agree_on_its_slot,nfr6_a_views_class_table_is_read_from_its_live_views,nfr6_live_views_of_one_class_must_share_their_table,nfr6_a_row_without_a_class_table_takes_the_live_one,nfr6_a_switch_case_is_read_from_its_jump_table,nfr6_new_tab_is_found_from_the_new_tab_command,nfr6_new_tab_is_taken_where_its_command_and_fingerprint_agree,nfr6_a_drawing_helper_is_found_by_the_call_from_its_caller,nfr6_a_caller_that_calls_every_fingerprint_place_names_no_helper.Not built or tested in the worktree (per AGENTS.md). The build, tests and a row run on Edge 157 are still to be done on develop after merge.
🤖 Generated with Claude Code