{"id":170,"date":"2020-12-14T17:38:50","date_gmt":"2020-12-14T17:38:50","guid":{"rendered":"https:\/\/fde.cat\/index.php\/2020\/12\/14\/infer-powering-microsofts-infer-a-new-static-analyzer-for-c\/"},"modified":"2021-02-02T13:44:38","modified_gmt":"2021-02-02T13:44:38","slug":"infer-powering-microsofts-infer-a-new-static-analyzer-for-c","status":"publish","type":"post","link":"https:\/\/fde.cat\/index.php\/2020\/12\/14\/infer-powering-microsofts-infer-a-new-static-analyzer-for-c\/","title":{"rendered":"Infer powering Microsoft\u2019s Infer#, a new static analyzer for C#"},"content":{"rendered":"<h2><span>What it is:<\/span><\/h2>\n<p><span>Infer# brings the <\/span><a href=\"https:\/\/fbinfer.com\/\"><span>Infer static analysis platform<\/span><\/a><span> to developers who use Microsoft\u2019s <\/span><a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/csharp\/\"><span>C#<\/span><\/a><span> programming language. It can already detect null-pointer dereference and resource leak bugs, thanks to <\/span><a href=\"https:\/\/engineering.fb.com\/2015\/06\/11\/developer-tools\/open-sourcing-facebook-infer-identify-bugs-before-you-ship\/\"><span>bi-abduction analysis<\/span><\/a><span>. Detection of race conditions based on <\/span><a href=\"https:\/\/engineering.fb.com\/2017\/10\/19\/android\/open-sourcing-racerd-fast-static-race-detection-at-scale\/\"><span>RacerD analysis<\/span><\/a><span> is also in the works. Infer# has been used to analyze Microsoft software, including Roslyn, DotNET SDK, ASP.NET Core, and MSBuild.<\/span><\/p>\n<p><span>Infer# was first <\/span><a href=\"https:\/\/youtu.be\/FPCZ2TIxrpg?t=13435\"><span>presented at the Infer Practitioners workshop<\/span><\/a><span>, colocated with<\/span><a href=\"https:\/\/pldi20.sigplan.org\/\"> <span>PLDI 2020<\/span><\/a><span>.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/infer-interprocedural-memory-safety-analysis-for-c\/\"><i><span>Read more about Infer#<\/span><\/i><\/a><i><span>.<\/span><\/i><\/p>\n<h2><span>What it does:<\/span><\/h2>\n<p><span>It provides a new language front end for C# in Infer. A new Infer front end is no small feat: It\u2019s essentially a compiler from the source language (in this case, the .NET bytecode for C#) to Infer\u2019s own intermediate language, called SIL. Infer analyses can then be reused for the new language with minimal adaptation, as they analyze SIL and not the source language itself.<\/span><\/p>\n<p><span>It also introduces a new language-independent JSON layer to represent SIL, opening the door to more Infer front ends for other programming languages in the future.<\/span><\/p>\n<h2><span>Why it matters:<\/span><\/h2>\n<p><span>While there are several open source static analyzers for C# to choose from, they typically are not able to find the deep <\/span><a href=\"https:\/\/engineering.fb.com\/2017\/09\/06\/android\/finding-inter-procedural-bugs-at-scale-with-infer-static-analyzer\/\"><span>inter-procedural bugs<\/span><\/a><span>, such as null dereferences, data races, or resource leaks, that Infer is able to find in languages like Java or C++. Infer# brings scalable, automated, and interprocedural <\/span><a href=\"https:\/\/fbinfer.com\/\"><span>Infer<\/span><\/a><span> analyses to the .NET platform.<\/span><\/p>\n<h2><span>Get it on GitHub:<\/span><\/h2>\n<p><a href=\"https:\/\/github.com\/microsoft\/infersharp\/wiki\/InferSharp:-A-Scalable-Code-Analytics-Tool-for-.NET\"><span>Infer#<\/span><\/a><\/p>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/engineering.fb.com\/2020\/12\/14\/open-source\/infer\/\">Infer powering Microsoft\u2019s Infer#, a new static analyzer for C#<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/engineering.fb.com\/\">Facebook Engineering<\/a>.<\/p>\n<p><a href=\"https:\/\/engineering.fb.com\/2020\/12\/14\/open-source\/infer\/\" target=\"_blank\" rel=\"noopener\">Read More<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What it is: Infer# brings the Infer static analysis platform to developers who use Microsoft\u2019s C# programming language. It can already detect null-pointer dereference and resource leak bugs, thanks to bi-abduction analysis. Detection of race conditions based on RacerD analysis is also in the works. Infer# has been used to analyze Microsoft software, including Roslyn,&hellip; <a class=\"more-link\" href=\"https:\/\/fde.cat\/index.php\/2020\/12\/14\/infer-powering-microsofts-infer-a-new-static-analyzer-for-c\/\">Continue reading <span class=\"screen-reader-text\">Infer powering Microsoft\u2019s Infer#, a new static analyzer for C#<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[1,7],"tags":[],"class_list":["post-170","post","type-post","status-publish","format-standard","hentry","category-external","category-technology","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":728,"url":"https:\/\/fde.cat\/index.php\/2023\/06\/27\/meta-developer-tools-working-at-scale\/","url_meta":{"origin":170,"position":0},"title":"Meta developer tools: Working at scale","date":"June 27, 2023","format":false,"excerpt":"Every day, thousands of developers at Meta are working in repositories with millions of files. Those developers need tools that help them at every stage of the workflow while working at extreme scale. In this article we\u2019ll go through a few of the tools in the development process. And, as\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":554,"url":"https:\/\/fde.cat\/index.php\/2022\/03\/15\/vespa-static-profiling-for-binary-optimization\/","url_meta":{"origin":170,"position":1},"title":"VESPA: Static profiling for binary optimization","date":"March 15, 2022","format":false,"excerpt":"What the research is: Recent research has demonstrated that binary optimization is important for achieving peak performance for various applications. For instance, the state-of-the-art BOLT binary optimizer developed at Meta, which is part of the LLVM Compiler Project, significantly improves the performance of highly optimized binaries produced using compilers\u2019 most\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":548,"url":"https:\/\/fde.cat\/index.php\/2022\/03\/08\/an-open-source-compositional-deadlock-detector-for-android-java\/","url_meta":{"origin":170,"position":2},"title":"An open source compositional deadlock detector for Android Java","date":"March 8, 2022","format":false,"excerpt":"What the research is: We\u2019ve developed a new static analyzer that catches deadlocks in Java code for Android without ever running the code. What distinguishes our analyzer from past research is its ability to analyze revisions in codebases with hundreds of millions of lines of code. We have deployed our\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":492,"url":"https:\/\/fde.cat\/index.php\/2021\/10\/20\/facebook-engineers-receive-2021-ieee-computer-society-cybersecurity-award-for-static-analysis-tools\/","url_meta":{"origin":170,"position":3},"title":"Facebook engineers receive 2021 IEEE Computer Society Cybersecurity Award for static analysis tools","date":"October 20, 2021","format":false,"excerpt":"Until recently, static analysis tools weren\u2019t seen by our industry as a reliable element of securing code at scale. After nearly a decade of investing in refining these systems, I\u2019m so proud to celebrate our engineering teams today for being awarded the IEEE Computer Society\u2019s Cybersecurity Award for Practice for\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":656,"url":"https:\/\/fde.cat\/index.php\/2022\/11\/22\/retrofitting-null-safety-onto-java-at-meta\/","url_meta":{"origin":170,"position":4},"title":"Retrofitting null-safety onto Java at Meta","date":"November 22, 2022","format":false,"excerpt":"We developed a new static analysis tool called Nullsafe that is used at Meta to detect NullPointerException (NPE) errors in Java code. Interoperability with legacy code and gradual deployment model were key to Nullsafe\u2019s wide adoption and allowed us to recover some null-safety properties in the context of an otherwise\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":263,"url":"https:\/\/fde.cat\/index.php\/2021\/08\/31\/minesweeper-automates-root-cause-analysis-as-a-first-line-defense-against-bugs\/","url_meta":{"origin":170,"position":5},"title":"Minesweeper automates root cause analysis as a first-line defense against bugs","date":"August 31, 2021","format":false,"excerpt":"Root cause analysis (RCA) is an important part of fixing any bug. After all, you can\u2019t solve a problem without getting to the heart of it. But RCA isn\u2019t always simple, especially at a scale like Facebook\u2019s. When billions of people are using an app on a variety of platforms\u2026","rel":"","context":"In &quot;Technology&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/comments?post=170"}],"version-history":[{"count":1,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/170\/revisions"}],"predecessor-version":[{"id":213,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/posts\/170\/revisions\/213"}],"wp:attachment":[{"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/media?parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/categories?post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fde.cat\/index.php\/wp-json\/wp\/v2\/tags?post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}