Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

denik (Denis Nikitin)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 2 2019, 2:52 PM (217 w, 1 d)

Recent Activity

Aug 15 2023

denik added inline comments to D158006: [Clang][WIP]Experimental implementation of data member packs in dependent context..
Aug 15 2023, 5:02 PM · Restricted Project, Restricted Project

May 30 2023

denik accepted D151575: [clang][diagnostics] Always show include stacks on top-level diagnostics.

As long as having In file included from on each error without notes from one include file is fine, I don't see any problem with this. LGTM.
But let's check what others think about it.

May 30 2023, 12:20 PM · Restricted Project, Restricted Project

May 25 2023

denik accepted D151162: Add -Wpacked-non-pod to -Wall.

Thanks @SlaterLatiao!

May 25 2023, 10:28 AM · Restricted Project, Restricted Project

May 24 2023

denik added inline comments to D151162: Add -Wpacked-non-pod to -Wall.
May 24 2023, 11:32 AM · Restricted Project, Restricted Project

Mar 22 2023

denik added inline comments to D146654: [clang] replaces numeric SARIF ids with heirarchical names.
Mar 22 2023, 3:26 PM · Restricted Project, Restricted Project

Jan 23 2023

denik added a reviewer for D142423: [clang-tidy] Fix segfault in bugprone-standalone-empty: cjdb.
Jan 23 2023, 5:11 PM · Restricted Project, Restricted Project
denik requested review of D142423: [clang-tidy] Fix segfault in bugprone-standalone-empty.
Jan 23 2023, 5:10 PM · Restricted Project, Restricted Project

Jan 10 2023

denik accepted D141107: [clang-tidy] don't warn when returning the result for bugprone-standalone-empty.

Thanks @v1nh1shungry for the fix!
The change and test cases look good to me.

Jan 10 2023, 10:15 AM · Restricted Project, Restricted Project

Dec 2 2022

denik added a comment to D128372: [Clang-Tidy] Empty Check.

I just took a glance and the code looks reasonable.

Dec 2 2022, 12:10 PM · Restricted Project, Restricted Project
denik updated the diff for D128372: [Clang-Tidy] Empty Check.

Replaced deprecated [[@LINE-1]]

Dec 2 2022, 10:58 AM · Restricted Project, Restricted Project
denik updated the diff for D128372: [Clang-Tidy] Empty Check.

Format changes.

Dec 2 2022, 10:46 AM · Restricted Project, Restricted Project

Oct 25 2022

denik added a comment to D128372: [Clang-Tidy] Empty Check.

@Eugene.Zelenko , could you please stamp the patch if you don't have any other concerns?

Oct 25 2022, 11:00 AM · Restricted Project, Restricted Project

Sep 29 2022

denik added a comment to D128372: [Clang-Tidy] Empty Check.

@LegalizeAdulthood, @njames93, friendly ping.

Sep 29 2022, 9:14 AM · Restricted Project, Restricted Project

Sep 21 2022

denik added a comment to D128372: [Clang-Tidy] Empty Check.

@LegalizeAdulthood, @njames93, is there anything else we should address in this change?

Sep 21 2022, 3:39 PM · Restricted Project, Restricted Project

Sep 16 2022

denik added a comment to D128372: [Clang-Tidy] Empty Check.

Any updates from the reviewers?

Sep 16 2022, 10:44 AM · Restricted Project, Restricted Project

Aug 26 2022

denik updated the summary of D128372: [Clang-Tidy] Empty Check.
Aug 26 2022, 2:04 PM · Restricted Project, Restricted Project
denik commandeered D128372: [Clang-Tidy] Empty Check.
Aug 26 2022, 1:57 PM · Restricted Project, Restricted Project

Aug 25 2022

denik accepted D131632: [clang] Enable output of SARIF diagnostics.
Aug 25 2022, 3:32 PM · Restricted Project, Restricted Project

Aug 24 2022

denik added inline comments to D131632: [clang] Enable output of SARIF diagnostics.
Aug 24 2022, 4:27 PM · Restricted Project, Restricted Project

Aug 22 2022

denik added inline comments to D131632: [clang] Enable output of SARIF diagnostics.
Aug 22 2022, 12:54 PM · Restricted Project, Restricted Project

Aug 19 2022

denik added inline comments to D131632: [clang] Enable output of SARIF diagnostics.
Aug 19 2022, 3:20 PM · Restricted Project, Restricted Project
denik added a comment to D131632: [clang] Enable output of SARIF diagnostics.

Thanks Abraham!

Aug 19 2022, 3:02 PM · Restricted Project, Restricted Project

Aug 3 2022

denik added a comment to D131084: Add support for specifying the severity of a SARIF Result..

Submitting for review:

Some notes:

There are a couple of ways I think we can acheive this, per the spec:

  1. The reportingDescriptor (rule) objects can be given a default configuration property, which can set the default warning level and other data such as rule parameters etc.
  2. The reportingDescriptor objects can omit the default configuration (which then allows operating with warning as default), and the level is then set when the result is reported.

The first approach would be "more correct", what are your thoughts on this? Would we benefit from having per-diagnostic configuration?

There is also the question about the "kind" of results in clang. From my reading of the spec, it seems that "fail" is the only case that applies to us because:

  • "pass": Implies no issue was found.
  • "open": This value is used by proof-based tools. It could also mean additional assertions required
  • "informational": The specified rule was evaluated and produced a purely informational result that does not indicate the presence of a problem
  • "notApplicable": The rule specified by ruleId was not evaluated, because it does not apply to the analysis target.

Of these "open" and "notApplicable" seem to be ones that *could* come to use but I'm not sure where / what kind of diagnostics would use these. Probably clang-tidy's bugprone-* suite?

Let me know what you think is a good way to approach this wrt clang's diagnostics system.

Hmm, we can probably use "informational" for notes, warnings, and remarks, but I'm kinda partial to proposing the latter two upstream.

Aug 3 2022, 12:22 PM · Restricted Project, Restricted Project

Jul 19 2022

denik accepted D129886: [clang] Add -fdiagnostics-format=sarif option for future SARIF output.
Jul 19 2022, 11:13 AM · Restricted Project, Restricted Project

Jul 18 2022

denik added a comment to D129886: [clang] Add -fdiagnostics-format=sarif option for future SARIF output.

Thanks for adding the flag!

Jul 18 2022, 12:03 PM · Restricted Project, Restricted Project

Jul 7 2022

denik accepted D128372: [Clang-Tidy] Empty Check.

Thanks Abraham!

Jul 7 2022, 2:22 PM · Restricted Project, Restricted Project

Jun 27 2022

denik added a comment to D128372: [Clang-Tidy] Empty Check.

Thanks for adding a check! Please check my comments.

Jun 27 2022, 12:13 PM · Restricted Project, Restricted Project

Feb 11 2022

denik added a comment to D109794: [Sanitizer] Allow setting the report path to create directory.

Are you able to patch in D119495 and see if that fixes the issue?

Yes. D119495 fixed the problem. Thanks for the quick solution!

Great, will try to get this submitted today, once I address the comments.

Just curious, did __llvm_profile_recursive_mkdir also create directories in a similar way (ignoring EEXIST status)? I'm asking because the same test was creating a PGO profile in a sandbox and it did not fail.

Interesting - I actually modeled the implementation here exactly on that function. It has the same unconditional mkdir with the same comment about ignoring failures due to existing directories.

While debugging the sandbox (before your fix), I noticed that the test crashed when the sandbox was checking lstat of the path from __sanitizer::CreateDir(). Can it be that the sanitizer intercepted the call but since it was __asan::AsanInitInternal() the handler was not set up yet? This would explain why it worked for PGO.

Not totally following - which handler?

Feb 11 2022, 4:05 PM · Restricted Project

Feb 10 2022

denik added a comment to D109794: [Sanitizer] Allow setting the report path to create directory.

This change breaks tests with sanitizers running in a sandbox.
If /usr/local/tmp/asan is in the allow-list for writing, the sandbox will kill the test when it tries to create /usr.

This failure is caught on Chrome OS, https://issuetracker.google.com/209296420.

It sounds like the issue is showing up with some Chrome OS tests built with -fsanitize=address, as opposed to in the unit test added here - is that correct?

Correct, I meant Chrome OS tests. Chrome OS uses Gentoo sandboxing for its unit tests.

If the former, by default the report_file is stderr - do you know where/how the report file path is being set to something else? Note the change only creates a directory for the given report_file path, the sanitizer change itself doesn't change the path. Before the report file creation would fail if the directory didn't exist.

log_path is set in https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/profiles/base/profile.bashrc#512
Note that the directory was created in the same function. And it's called before entering a sandbox.

Can we skip CreateDir in RecursiveCreateParentDirs if the path exists? So it will be no-op in our case?

Oh I see, we normally assume it will error (but we ignore the error) if the directory already exists. But in the sandboxed case it doesn't like the creation attempt, even though the dir actually exists.

Yeah, we can presumably use "stat" to check before trying to create. Actually, there is already a FileExists() in sanitizer_file.h that has implementations in the various OS specific sanitizer files. Most (except windows) call stat (but look for a regular file). I can just add something like a DirExists() interface that has the equivalent dir check using the same interfaces in each OS implementation. Will work on that tomorrow.

Are you able to patch in D119495 and see if that fixes the issue?

Feb 10 2022, 10:18 PM · Restricted Project

Feb 9 2022

denik added a comment to D109794: [Sanitizer] Allow setting the report path to create directory.

This change breaks tests with sanitizers running in a sandbox.
If /usr/local/tmp/asan is in the allow-list for writing, the sandbox will kill the test when it tries to create /usr.

This failure is caught on Chrome OS, https://issuetracker.google.com/209296420.

It sounds like the issue is showing up with some Chrome OS tests built with -fsanitize=address, as opposed to in the unit test added here - is that correct?

Correct, I meant Chrome OS tests. Chrome OS uses Gentoo sandboxing for its unit tests.

Feb 9 2022, 10:13 PM · Restricted Project
denik added a comment to D109794: [Sanitizer] Allow setting the report path to create directory.

This change breaks tests with sanitizers running in a sandbox.
If /usr/local/tmp/asan is in the allow-list for writing, the sandbox will kill the test when it tries to create /usr.

Feb 9 2022, 6:39 PM · Restricted Project

Jan 17 2020

denik added a comment to D68912: Adds -Wrange-loop-analysis to -Wall.

We are hitting the warning in template code with bool and loop like this: "for (const auto& element : value)" where element is bool from template. But not always.
When it is bool the warning triggers:
error: loop variable 'element' is always a copy because the range of type 'const std::vector<bool, allocator<bool> >' does not return a reference [-Werror,-Wrange-loop-analysis]

Jan 17 2020, 12:09 PM · Restricted Project

Sep 12 2019

denik added inline comments to D52524: Add -Wpoison-system-directories warning.
Sep 12 2019, 8:20 AM · Restricted Project
denik updated the diff for D52524: Add -Wpoison-system-directories warning.

Combined two if into one.

Sep 12 2019, 8:19 AM · Restricted Project

Sep 11 2019

denik added a comment to D52524: Add -Wpoison-system-directories warning.

Ping @aaron.ballman , please verify the change.

Sep 11 2019, 11:52 AM · Restricted Project

Aug 28 2019

denik added a comment to D52524: Add -Wpoison-system-directories warning.

Hi Aaron,

Aug 28 2019, 5:54 PM · Restricted Project
denik updated the diff for D52524: Add -Wpoison-system-directories warning.
Aug 28 2019, 5:19 PM · Restricted Project

Aug 19 2019

denik updated the diff for D52524: Add -Wpoison-system-directories warning.

Removed check for libraries.

Aug 19 2019, 4:34 PM · Restricted Project
denik retitled D52524: Add -Wpoison-system-directories warning from Add -Wno-poison-system-directories flag to Add -Wpoison-system-directories warning.
Aug 19 2019, 4:33 PM · Restricted Project
denik added a comment to D52524: Add -Wpoison-system-directories warning.

Manoj, please check updated diff.

Aug 19 2019, 11:33 AM · Restricted Project
denik updated the diff for D52524: Add -Wpoison-system-directories warning.
Aug 19 2019, 11:33 AM · Restricted Project
denik added inline comments to D52524: Add -Wpoison-system-directories warning.
Aug 19 2019, 10:38 AM · Restricted Project
denik updated the diff for D52524: Add -Wpoison-system-directories warning.

Changed Wpoison-system-directories warning to be disabled by default.

Aug 19 2019, 10:37 AM · Restricted Project

Aug 14 2019

denik updated the diff for D52524: Add -Wpoison-system-directories warning.

Fixed clang-format.

Aug 14 2019, 3:41 PM · Restricted Project
denik updated the diff for D52524: Add -Wpoison-system-directories warning.

Updated the code (removed Diag propagation).
Added test cases.

Aug 14 2019, 3:00 PM · Restricted Project

Aug 8 2019

denik commandeered D52524: Add -Wpoison-system-directories warning.

Taking ownership of the change as Yunlian is no longer working on this CL.

Aug 8 2019, 10:02 AM · Restricted Project