Facebook’s evolutionary search for crashing software bugs – Ars Technica
Enlarge / An arty photo of one of Facebook's data centres.
With 1.3 billion daily users, the Facebook site and its apps are the most-used pieces of software in the world.Only a handful of software companies have ascended to a similar echelon of ubiquity, including Microsoft, Google, and Apple. For better or worse, that is the world we now live in, where a large percentage our waking hours is spent interacting with softwareand Facebook leads the pack, with the average userspending 50 minutes per day mostly watching videos and liking photos of babies.Television is the only leisure activity in the worldthat receives more attention than Facebook. And don't forget that Facebook now owns Instagram and WhatsApp, too.
Adobe Stock
That's why Facebook has some advanced bug-finding toolsincluding a devilishly clever dynamic analysis tool, initially devised by students at University College London and then acquired and further developed by Facebook's London office. This is the first time they've shown the inner workings of this new tool, dubbed Sapienz, to the press.
Eachtechnique serves a different purpose, and a big software company would usually use both. Static analysis is perfect for formally verifying that an algorithm works as intended, or for highlighting bad code that might allow for a buffer overflow orother security vulnerability. Dynamic analysis is better at finding the gnarly edge cases that cause crashes. Humans can manually perform both analyses, of course, but computers are obviously a lot quicker when it comes to testing millions of possible inputs.
Facebook's static analyser is called Infer. The company open-sourced the toolin 2013, and a lot of big names (Uber, Spotify, Mozilla) use it. There isn't a whole lot to say about it, other than it seems to be very popular and effective; download it today!
Sapienz has three main tricks up its sleeve.First, it uses a search-based evolutionary algorithm, rather than a random or model-based approach. Second, the fitness function that guides how the algorithm evolves is incredibly complex: there are multiple objectives, entwined by Pareto optimality, that must be fulfilled for each evolutionary change to be a success. And third, Facebook can run Sapienz on its One World test platform, which lets engineers find crashing bugs on hundreds of different Android devices simultaneously. (Sapienz only supportsAndroid apps currently, though there are plans to expand to otherplatforms and app types.)
The key to a successful evolutionary algorithm is its fitness function. I'm not your college computer science lecturer, so I won't go into too much detail, but a fitness function essentially looks at the result of a test case, and decides how close that result is to a desired outcome/objective. The results that don't fulfil the fitness function are tied up in a burlap sack and thrown in the river; the good ones are bred together, to form the basis of the next round of testing.
According to Facebook's engineers, most of their secret sauce is in Sapienz's fitness function, which has three objectives: to test as many of the app's methods and statements as possible, find as many crashes as possible, and minimise the length of the test sequences required to cause crashes. The first two are all about producing better, crash-free software; the third is to improve the efficiency of the system, so that a decent number of crashes can be found in a reasonable amount of time.
These three objectives are assessed by the fitness function for Pareto efficiency. That is, one objective isn't more important than the others: if the evolutionary algorithm is only producing long test sequences, but they're providing good coverage and finding lots of crashes, then those long tests will be kept alive. Over time the systemtries to hit Pareto optimality: where it's impossible to improve one objective without negatively impacting another. So, in this case, the algorithm would attempt to reduce the test sequence length without reducing coverage or the fault revelation.
Sapienz also strays slightly across the border into static analysis: it attempts to reverse-engineer the app (an Android APK in this case) to pull out some strings, which it then uses as natural-language inputs when testing begins. "We found this seeding to be particularly useful when testing apps that require a lot of user-generated content, e.g., Facebook, because it enables Sapienz to post and comment in an apparently more human-meaningful way," say the researchers.
Listing image by Adobe Stock
Read the original:
Facebook's evolutionary search for crashing software bugs - Ars Technica
- Unintended Acceleration Is The Last Thing A Supercharged Ford Mustang Needs - Yahoo! Autos - October 21st, 2025 [October 21st, 2025]
- Top Password Recovery Software for 2025: All the Best Services Picked by the Experts - TechRadar - October 19th, 2025 [October 19th, 2025]
- Windows 10 PC can't be upgraded? You have 5 options - and must act now - ZDNET - October 19th, 2025 [October 19th, 2025]
- Free Software Foundation Is Serious About The Librephone Project [To Bring Mobile Freedom To The Masses] - It's FOSS News - October 17th, 2025 [October 17th, 2025]
- FSF Librephone battles the proprietary binary blob - theregister.com - October 17th, 2025 [October 17th, 2025]
- World's first truly free software phone? That's the FSF's new 'long game' - ZDNET - October 17th, 2025 [October 17th, 2025]
- Belarusian authorities bought trace-free tracking software, an investigation finds - - October 17th, 2025 [October 17th, 2025]
- First convictions linked to Post Office Capture software referred for appeal - Free Press Series - October 17th, 2025 [October 17th, 2025]
- 10 open-source Windows apps I can't live without - and they're all free - ZDNET - October 15th, 2025 [October 15th, 2025]
- Borderlands 4: Gearbox Software Reveals Upcoming Content for the Game Including a DLC, a Free Event and More - IGN India - October 15th, 2025 [October 15th, 2025]
- Triple-zero software 'hanging by a thread' - Kyabram Free Press - October 15th, 2025 [October 15th, 2025]
- Free Up More Google Drive Space at No Cost With These Hacks - CNET - October 13th, 2025 [October 13th, 2025]
- 8 free Linux apps that make tricky tasks surprisingly easy - no command line required - ZDNET - October 13th, 2025 [October 13th, 2025]
- Running Out of Space on Your iPhone? Before You Delete Anything Try This - CNET - October 11th, 2025 [October 11th, 2025]
- 4 free video editors that make me question why I ever paid for Adobe software - XDA - October 9th, 2025 [October 9th, 2025]
- A 2TB PCIe 5.0 SSD for less than $140? This Crucial P510 Prime Big Deals Day discount with free Acronis software is exactly why I'm putting it... - October 9th, 2025 [October 9th, 2025]
- At 40 Years, Free Software Foundation Now Wants to 'Free Your Phone' - It's FOSS News - October 9th, 2025 [October 9th, 2025]
- 8 free Linux apps that are surprisingly useful - no command line required - ZDNET - October 4th, 2025 [October 4th, 2025]
- We Finally Have Free Anti-Robocall Tools That Work - The New York Times - October 4th, 2025 [October 4th, 2025]
- Illinois State Bar Association Offering Free Trust Accounting & Billing Software to All Members With Smokeball Bill - Illinois State Bar... - October 2nd, 2025 [October 2nd, 2025]
- Suffolk tech giant pledges $10m to give charities free software for life - Ipswich.co.uk - October 2nd, 2025 [October 2nd, 2025]
- Eventide Temperance Lite, "the world's first musical reverb plugin": free download for a limited time - synth anatomy - October 2nd, 2025 [October 2nd, 2025]
- Windows 10 extended support is now free, but only in Europe Microsoft capitulates on controversial $30 ESU price tag which remains firmly in place... - September 30th, 2025 [September 30th, 2025]
- You can now install iOS 26 on your iPhone: Everything to know about the free software update - Engadget - September 30th, 2025 [September 30th, 2025]
- Turns out, Microsoft will offer Windows 10 security updates for free until 2026but unfortunately not in the US or the UK - PC Gamer - September 30th, 2025 [September 30th, 2025]
- Free Alternatives to Photoshop and Word: How to Save on Software - 112.ua - September 30th, 2025 [September 30th, 2025]
- Delete those pricey programs with our four tips to help you find the best bargain software solutions - The Sun - September 30th, 2025 [September 30th, 2025]
- BlueCruise is Getting Better for Current Truck Owners - Ford From the Road - September 28th, 2025 [September 28th, 2025]
- Best typing tutor software of 2025 - TechRadar - September 25th, 2025 [September 25th, 2025]
- You can update your iPhone to iOS 26 for free right now - here's which models support it - ZDNET - September 25th, 2025 [September 25th, 2025]
- This is the best photo editing software to use in 2025 - Amateur Photographer - September 25th, 2025 [September 25th, 2025]
- From Abuse to Alignment: Why We Need Sustainable Open Source Infrastructure - Sonatype - September 25th, 2025 [September 25th, 2025]
- Think you've seen the weirdest place to play DOOM? Think again - Creative Bloq - September 23rd, 2025 [September 23rd, 2025]
- OpenSSF to freeloaders: Open source infra isn't free - theregister.com - September 23rd, 2025 [September 23rd, 2025]
- I transformed our LAN gaming setup with a mini PC and free software - XDA - September 21st, 2025 [September 21st, 2025]
- iOS 26 is ready to download: Everything to know about the free iPhone software update - Engadget - September 21st, 2025 [September 21st, 2025]
- Filmmakers - you can now storyboard your next movie totally free with this software - Yahoo! Tech - September 21st, 2025 [September 21st, 2025]
- Oak Creek Police Crime Analyst Wins Top International Award with Innovative Free Software Dashboard - Hoodline - September 21st, 2025 [September 21st, 2025]
- Molecularbytes Atomicreverbfree, a free algorithmic reverb for macOS and Windows - synth anatomy - September 19th, 2025 [September 19th, 2025]
- Meadows Introduces Free Imposition Software for Adobe InDesign - PRWeb - September 19th, 2025 [September 19th, 2025]
- Lucid just gave its EV owners a free dash cam mode and Tesla-style parking monitor all from a software update - TechRadar - September 19th, 2025 [September 19th, 2025]
- My Google Pixel just updated and is better than ever get your free software upgrade now - T3 - September 19th, 2025 [September 19th, 2025]
- NLSIU study hails Keralas KITE as key model for implementing Free and Open Source Software (FOSS) - The Times of India - September 19th, 2025 [September 19th, 2025]
- These are the top free Windows tools that I use on a daily basis to boost my productivity - Tom's Hardware - September 17th, 2025 [September 17th, 2025]
- iOS 26 is finally here: Everything to know about the free iPhone software update - Engadget - September 17th, 2025 [September 17th, 2025]
- When does iOS 26 come out? Date and time you can download the new iPhone operating system around the world - Fast Company - September 17th, 2025 [September 17th, 2025]
- Why Pie Is Becoming the UKs Go-To Free Tax Software in 2025 - The Globe and Mail - September 13th, 2025 [September 13th, 2025]
- iOS 26: What to know about the free iPhone software update ahead of the Apple event today - Engadget - September 11th, 2025 [September 11th, 2025]
- I built a photo editing workflow with nothing but free and open-source tools - xda-developers.com - September 9th, 2025 [September 9th, 2025]
- TapeFi Stop, free vinyl stop simulator plugin for macOS and Windows - synth anatomy - September 9th, 2025 [September 9th, 2025]
- Farming Simulator 25 Releases Third Free Update - Bleeding Cool News - September 6th, 2025 [September 6th, 2025]
- One of the biggest names in video editing is coming to smartphones and it's free. Meet Premiere Pro for mobile - Digital Camera World - September 5th, 2025 [September 5th, 2025]
- Microsoft wants to give US government Copilot for free - theregister.com - September 3rd, 2025 [September 3rd, 2025]
- I Thought My Gmail Inbox Was Toast. Then I Got Back 15GB of Free Storage - CNET - September 3rd, 2025 [September 3rd, 2025]
- The Truth About KMSPico Downloads: Risks and Better Alternatives - inkl - September 3rd, 2025 [September 3rd, 2025]
- Artistapirata Download Free Programs, Games, and Software in 2026 - nerdbot - August 29th, 2025 [August 29th, 2025]
- Cognyte Software Ltd. stock prediction for this week - July 2025 Closing Moves & Free Low Drawdown Momentum Trade Ideas - Newser - August 29th, 2025 [August 29th, 2025]
- Analyzing Upland Software Inc. with multi timeframe charts - Forecast Cut & Free Growth Oriented Trading Recommendations - Newser - August 29th, 2025 [August 29th, 2025]
- Can Upland Software Inc. recover in the next quarter - Options Play & Free Growth Oriented Trading Recommendations - Newser - August 27th, 2025 [August 27th, 2025]
- Custom watchlist performance reports with Asure Software Inc. - Weekly Market Summary & Reliable Breakout Stock Forecasts - Newser - August 27th, 2025 [August 27th, 2025]
- Is Paycom Software Inc. forming a reversal pattern - Trend Reversal & Free Reliable Trade Execution Plans - Newser - August 27th, 2025 [August 27th, 2025]
- What the charts say about CyberArk Software Ltd. today - Weekly Volume Report & Free Reliable Trade Execution Plans - Newser - August 26th, 2025 [August 26th, 2025]
- Is this a good reentry point in Guidewire Software Inc. - 2025 Market Sentiment & Free AI Powered Buy and Sell Recommendations - Newser - August 26th, 2025 [August 26th, 2025]
- Trend analysis for OneStream Software LLC this week - Weekly Trend Summary & Free Expert Approved Momentum Trade Ideas - Newser - August 24th, 2025 [August 24th, 2025]
- Detecting price anomalies in Paycom Software Inc. with AI - July 2025 Volume & Free Community Supported Trade Ideas - Newser - August 24th, 2025 [August 24th, 2025]
- Using AI based signals to follow Unity Software Inc. - July 2025 Breakouts & Free Verified High Yield Trade Plans - Newser - August 24th, 2025 [August 24th, 2025]
- Best graphic design software of 2025: Top picks tested for creative professionals and beginners - TechRadar - August 22nd, 2025 [August 22nd, 2025]
- Garmin Fenix 8 and Venu X1 get free software update that includes top features for runners and triathletes - Tom's Guide - August 22nd, 2025 [August 22nd, 2025]
- 6 Free and Open-Source Software for Creating Stunning Presentations - How-To Geek - August 18th, 2025 [August 18th, 2025]
- "It's one of the most powerful software sound design tools on earth and it's free": Try out this modular audio processing playground used... - August 18th, 2025 [August 18th, 2025]
- BetBlocker and ROGA Partner to Expand Free Gambling Blocker Access in the U.S. - European Gaming Industry News - August 14th, 2025 [August 14th, 2025]
- Hyundai & Kia thefts are down, Camaro ZL1 thefts are up, and a software glitch may be to blame. - wfmynews2.com - August 14th, 2025 [August 14th, 2025]
- There Is No Such Thing as Free Technology Software Solutions - ICTworks - August 12th, 2025 [August 12th, 2025]
- UnplugRed ModMan, a free perlin noise modulation plugin for mac, Linux and Windows - synth anatomy - August 12th, 2025 [August 12th, 2025]
- HY-Plugins HY-MBMFX3, multiband multi-FX plugin with modulation & free version - synth anatomy - August 7th, 2025 [August 7th, 2025]
- Choose the right software for Making Tax Digital for Income Tax - GOV.UK - August 3rd, 2025 [August 3rd, 2025]
- Best free PDF editor of 2025: We tested out these completely free to use apps - TechRadar - August 1st, 2025 [August 1st, 2025]
- D&D is 'here to earn your trust, not ask for it', starting with making Beyond's maps software free, brushing up the SRD, and sharing 'third-party... - August 1st, 2025 [August 1st, 2025]
- The Best Video Editing Software We've Tested (July 2025) - PCMag - July 27th, 2025 [July 27th, 2025]
- Download iOS 26 now and upgrade your iPhone to the Liquid Glass look for free - T3 - July 27th, 2025 [July 27th, 2025]