Merge branch 'feat/dylib-resolution' into feat/dyld-shared-cache
Carry conditional-load propagation, parsed-image digest binding, and segment-wise root resolution into the shared-cache trace. Also: - Make cache compatibility directional: an arm64e cache serves arm64 processes and an x86_64h cache serves x86_64 ones, not the reverse. - Require the complete 24-byte LC_BUILD_VERSION with its declared tool records, and the 16-byte LC_VERSION_MIN_* command, before recording a platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { chmod, mkdir, writeFile } from "node:fs/promises";
|
||||
import { chmod, mkdir, symlink, writeFile } from "node:fs/promises";
|
||||
import { dirname, join } from "node:path";
|
||||
|
||||
import { describe, expect } from "vitest";
|
||||
@@ -129,7 +129,15 @@ describe("trace-dylib-resolution CLI", () => {
|
||||
(narrowed.json as { normalized_result: { roots: unknown } })
|
||||
.normalized_result.roots,
|
||||
).toEqual([{ image: "Contents/MacOS/App", architecture: "arm64" }]);
|
||||
for (const root of ["../outside", "Contents/Info.plist"]) {
|
||||
// A root below a symlinked directory that points outside the bundle.
|
||||
const outside = await createTestTempDirectory("rea-dylib-outside-");
|
||||
await writeFiles(outside, { Tool: machoImage({}) });
|
||||
await symlink(outside, join(app, "Contents/Linked"));
|
||||
for (const root of [
|
||||
"../outside",
|
||||
"Contents/Info.plist",
|
||||
"Contents/Linked/Tool",
|
||||
]) {
|
||||
const rejected = await cli.run({
|
||||
arguments: ["trace-dylib-resolution", app, "--root", root, "--json"],
|
||||
environment: ENVIRONMENT,
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
@interface ReaDispatchFixture : NSObject <ReaDispatchProtocol> {
|
||||
int state;
|
||||
}
|
||||
@property(nonatomic, copy) NSString *fixtureName;
|
||||
- (void)performAction:(id)sender;
|
||||
+ (int)fixtureVersion;
|
||||
@end
|
||||
@@ -16,4 +17,11 @@
|
||||
- (void)performAction:(id)sender { state += sender == nil ? 1 : 2; }
|
||||
+ (int)fixtureVersion { return 1; }
|
||||
@end
|
||||
|
||||
@interface NSString (ReaDispatchAdditions)
|
||||
- (NSUInteger)reaFixtureLength;
|
||||
@end
|
||||
@implementation NSString (ReaDispatchAdditions)
|
||||
- (NSUInteger)reaFixtureLength { return self.length; }
|
||||
@end
|
||||
int main(void) { return 0; }
|
||||
|
||||
Reference in New Issue
Block a user