Page MenuHomePhabricator

PRESIDENT810 (Kaining Zhong)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 11 2021, 12:52 AM (67 w, 6 d)

Recent Activity

Jul 18 2022

PRESIDENT810 updated the diff for D129556: [lld-macho] Fix loading same libraries from both LC_LINKER_OPTION and command line.

Updated according to int3's guide. Yeah this way is much more simplified indeed...

Jul 18 2022, 11:58 PM · Restricted Project, Restricted Project, Restricted Project

Jul 17 2022

PRESIDENT810 updated the diff for D129556: [lld-macho] Fix loading same libraries from both LC_LINKER_OPTION and command line.
Jul 17 2022, 7:35 PM · Restricted Project, Restricted Project, Restricted Project

Jul 16 2022

PRESIDENT810 updated the diff for D129556: [lld-macho] Fix loading same libraries from both LC_LINKER_OPTION and command line.
Jul 16 2022, 7:21 AM · Restricted Project, Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D129556: [lld-macho] Fix loading same libraries from both LC_LINKER_OPTION and command line.

I removed ForceLoad enum and add LoadFrom & LoadScope. LoadFrom indicates currently where is this archive from and LoadScope means what symbols should we load from this archive (only lazy load, load ObjC symbols, load all symbols or just skip loading this time). Now addFile accepts a LoadFrom enum so it is able to know if this archive is from CLI or LC_LINKER_OPTION. Based on this LoadFrom enum and the LoadFrom enum in its cache (if any), we can decide what symbols we need to load this time. I think this could be clearer than our previous ForceLoad? Also, I added a table in Config.h's comment to explain my implementation when encountered with these flags, please check it for me to make sure that I understand this right!

Jul 16 2022, 7:18 AM · Restricted Project, Restricted Project, Restricted Project

Jul 13 2022

PRESIDENT810 updated the diff for D129556: [lld-macho] Fix loading same libraries from both LC_LINKER_OPTION and command line.

I just realized that -force_load should not work only if the same library is already explicitly passed from command line, but not when it is previously passed from LC_LINKER_OPTION. I revised how I determine if -force_load should work by saving libraries shown in command line in a DenseSet.

Jul 13 2022, 1:37 AM · Restricted Project, Restricted Project, Restricted Project

Jul 12 2022

PRESIDENT810 updated the summary of D129556: [lld-macho] Fix loading same libraries from both LC_LINKER_OPTION and command line.
Jul 12 2022, 4:54 AM · Restricted Project, Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D129556: [lld-macho] Fix loading same libraries from both LC_LINKER_OPTION and command line.
Jul 12 2022, 4:53 AM · Restricted Project, Restricted Project, Restricted Project
PRESIDENT810 requested review of D129556: [lld-macho] Fix loading same libraries from both LC_LINKER_OPTION and command line.
Jul 12 2022, 3:27 AM · Restricted Project, Restricted Project, Restricted Project

Jul 7 2022

PRESIDENT810 added a comment to D129062: [lld-macho] Handle user-provided dtrace symbols to avoid linking failure.

lgtm, thanks! Do you have commit permissions or do you need me to land this for you?

Jul 7 2022, 10:40 AM · Restricted Project, Restricted Project, Restricted Project

Jul 6 2022

PRESIDENT810 updated the diff for D129062: [lld-macho] Handle user-provided dtrace symbols to avoid linking failure.

Update according to int3's advice.

Jul 6 2022, 8:18 PM · Restricted Project, Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D129062: [lld-macho] Handle user-provided dtrace symbols to avoid linking failure.

Pass reloc by reference instead of by value. Remove the unnecessary assertion. Use toString(Symbol *) instead of getName().

Jul 6 2022, 7:55 AM · Restricted Project, Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D129062: [lld-macho] Handle user-provided dtrace symbols to avoid linking failure.

Remove some unnecessary code. Add comment for handleDtraceReloc function. Replace IR tests with assembly tests.

Jul 6 2022, 1:54 AM · Restricted Project, Restricted Project, Restricted Project

Jul 4 2022

PRESIDENT810 added a comment to D126464: [lldb] Add support to load object files from thin archives.

What --author flag should I use for you when landing this?

Jul 4 2022, 8:07 PM · Restricted Project, Restricted Project
PRESIDENT810 requested review of D129062: [lld-macho] Handle user-provided dtrace symbols to avoid linking failure.
Jul 4 2022, 12:55 AM · Restricted Project, Restricted Project, Restricted Project

Jun 30 2022

PRESIDENT810 added a comment to D126464: [lldb] Add support to load object files from thin archives.

ping

Jun 30 2022, 1:58 AM · Restricted Project, Restricted Project

Jun 20 2022

PRESIDENT810 added a comment to D126464: [lldb] Add support to load object files from thin archives.

Hi, sorry to interrupt but I just forgot to mention that I didn't have access to commit. Anyone can please help me land this one if it looks ok?

Jun 20 2022, 1:08 AM · Restricted Project, Restricted Project

Jun 14 2022

PRESIDENT810 added a comment to D126464: [lldb] Add support to load object files from thin archives.

ping

Jun 14 2022, 8:36 PM · Restricted Project, Restricted Project

Jun 7 2022

PRESIDENT810 updated the diff for D126651: [clang-diff] Fix getStmtValue when dealing with wide, UTF16 UTF32 chars.

Sorry! I'm a novice at LLVM and I just didn't realize that those types can be implicitly cast to ArrayRef ... I have changed those and it should be fine now!

Jun 7 2022, 12:57 AM · Restricted Project, Restricted Project

Jun 6 2022

PRESIDENT810 updated the diff for D126651: [clang-diff] Fix getStmtValue when dealing with wide, UTF16 UTF32 chars.
Jun 6 2022, 9:38 PM · Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D126651: [clang-diff] Fix getStmtValue when dealing with wide, UTF16 UTF32 chars.

More refactoring following Johannes's suggestion

Jun 6 2022, 9:34 PM · Restricted Project, Restricted Project

Jun 5 2022

PRESIDENT810 updated the diff for D126464: [lldb] Add support to load object files from thin archives.

Add tests by introducing llvm-ar to produce thin archives

Jun 5 2022, 11:19 PM · Restricted Project, Restricted Project

Jun 1 2022

PRESIDENT810 updated the diff for D126651: [clang-diff] Fix getStmtValue when dealing with wide, UTF16 UTF32 chars.

Refactored some code and add support of U16 & U32 characters, as well as tests for them.

Jun 1 2022, 6:34 AM · Restricted Project, Restricted Project

May 30 2022

PRESIDENT810 requested review of D126651: [clang-diff] Fix getStmtValue when dealing with wide, UTF16 UTF32 chars.
May 30 2022, 6:48 AM · Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D126464: [lldb] Add support to load object files from thin archives.

I have refactored my code so it should looks cleaner now, but I'm not sure how to add a test. It seems that adding a test for thin archive on macOS platforms can be not so straightforward. I see that in lldb/test/API/functionalities/archives/Makefile, the test suite is using libtool instead of ar to create archives on macOS platforms, and I don't know whether I can produce a thin archive with that. Also, ld on macOS platforms seems to be unable to identify thin archives (I'm using ld64.lld when testing my code locally).

May 30 2022, 1:04 AM · Restricted Project, Restricted Project

May 26 2022

PRESIDENT810 updated the summary of D126464: [lldb] Add support to load object files from thin archives.
May 26 2022, 7:03 AM · Restricted Project, Restricted Project
PRESIDENT810 requested review of D126464: [lldb] Add support to load object files from thin archives.
May 26 2022, 7:00 AM · Restricted Project, Restricted Project

May 16 2022

PRESIDENT810 added a comment to D125073: [lldb-vscode] Fix data race in lldb-vscode when running with ThreadSanitizer.

Hi, I just forgot to mention that I don't really have access to commit... So if any people see this and this patch looks good to them, maybe please help me commit this one?

May 16 2022, 9:00 PM · Restricted Project, Restricted Project

May 11 2022

PRESIDENT810 updated the diff for D125073: [lldb-vscode] Fix data race in lldb-vscode when running with ThreadSanitizer.

Update to using std::atomic to avoid data race instead of mutex lock.

May 11 2022, 12:22 AM · Restricted Project, Restricted Project

May 5 2022

PRESIDENT810 requested review of D125073: [lldb-vscode] Fix data race in lldb-vscode when running with ThreadSanitizer.
May 5 2022, 8:50 PM · Restricted Project, Restricted Project

Feb 6 2022

PRESIDENT810 added a comment to D118331: [llvm-objdump][macho] Add initial --chained_fixups support.

This is great, but I recently started a patch series to upstream Apple's internal implementation. Maybe we can work together to land this feature?

Feb 6 2022, 1:47 AM · Restricted Project, Restricted Project

Jan 27 2022

PRESIDENT810 requested review of D118331: [llvm-objdump][macho] Add initial --chained_fixups support.
Jan 27 2022, 12:56 AM · Restricted Project, Restricted Project

Oct 20 2021

PRESIDENT810 added a comment to D111706: [lld-macho] Fix dangling string reference when adding frameworks.

Please ignore my last updated diff, I didn't see int3's latest comment at that time. I will see what I could do about those two new issues, and as for this test, I think maybe I should make it conform to int3's newest revision (https://reviews.llvm.org/D112195).

Oct 20 2021, 9:15 PM · Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D111706: [lld-macho] Fix dangling string reference when adding frameworks.
Oct 20 2021, 9:04 PM · Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D111706: [lld-macho] Fix dangling string reference when adding frameworks.

Now my test uses cp command to create framework instead of ln command. Hope this will do, and if there is any problem, please let me know so I can try other workarounds.

Oct 20 2021, 8:19 PM · Restricted Project, Restricted Project

Oct 19 2021

PRESIDENT810 updated the diff for D111706: [lld-macho] Fix dangling string reference when adding frameworks.

Removed some unnecessary saver.save().

Oct 19 2021, 9:30 PM · Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D111706: [lld-macho] Fix dangling string reference when adding frameworks.

I removed the unnecessary "Function Attrs" line in my test, and wrote some comments to explain why some lines (which are seemingly not testing linker options) is added to the test.

Oct 19 2021, 7:34 PM · Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D111706: [lld-macho] Fix dangling string reference when adding frameworks.
Oct 19 2021, 1:31 AM · Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D111706: [lld-macho] Fix dangling string reference when adding frameworks.

Shorten my test by removing some irrelevant symbols.

Oct 19 2021, 1:25 AM · Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D111706: [lld-macho] Fix dangling string reference when adding frameworks.

I rewrote my test using llvm IR, and add it to the lc-linker-option.ll test. I also add "saver.save()" wherever a function calls resolveDylibPath without saving the string itself, and removed saving StringRef instance in DriverUtils.cpp:line 199.

Oct 19 2021, 12:37 AM · Restricted Project, Restricted Project

Oct 18 2021

PRESIDENT810 updated the summary of D111706: [lld-macho] Fix dangling string reference when adding frameworks.
Oct 18 2021, 1:46 AM · Restricted Project, Restricted Project
PRESIDENT810 updated the diff for D111706: [lld-macho] Fix dangling string reference when adding frameworks.

I added %t to paths in my test, and they should be ok now. I also changed a few functions related to adding frameworks, so now they return StringRef instances instead of std::string, and their values are all saved by saver.save(). In this way I think we don't need to change the key of loadArchives to hash_code.

Oct 18 2021, 1:46 AM · Restricted Project, Restricted Project

Oct 15 2021

PRESIDENT810 updated PRESIDENT810.
Oct 15 2021, 8:59 AM

Oct 14 2021

PRESIDENT810 updated the diff for D111706: [lld-macho] Fix dangling string reference when adding frameworks.

Add a test case to illustrate where a framework (archive) is loaded twice.

Oct 14 2021, 6:16 AM · Restricted Project, Restricted Project

Oct 13 2021

PRESIDENT810 removed a reviewer for D111706: [lld-macho] Fix dangling string reference when adding frameworks: gkm.
Oct 13 2021, 3:50 AM · Restricted Project, Restricted Project
PRESIDENT810 requested review of D111706: [lld-macho] Fix dangling string reference when adding frameworks.
Oct 13 2021, 3:49 AM · Restricted Project, Restricted Project