Nico Weber
22f701d657
malloc: Keep some stats and dump them at process exit if LIBC_DUMP_MALLOC_STATS is set
...
Very bare-bones and barely useful. Can go away once the perf_event-based
malloc tracking is further along.
2020-08-17 09:43:23 +02:00
Brian Gianforcaro
c44d2515b4
Kernel: Emit ProcFS pledge/veil properties as "N/A" for kernel processes
...
Pledges and Veil state don't really make sense for kernel mode
processes, as they can do what ever they want since they are in
kernel mode. Make this clear in the system monitor UI by marking
these entries as null.
2020-08-17 09:42:07 +02:00
Brian Gianforcaro
6fa76ed2e3
LibCore: Fix unitialized struct member in to_address_in, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
73ab030f88
FileManager: Fix descriptor leak in copy_file, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
e43d5d5eaa
FileManger: Fix file descriptor leak in copy_file_or_directory, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
bcbac83a8b
Userland: Explicitly ignore number of types read, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
9ffbe03bdb
LibC: Missing varargs cleanup in ioctl
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
dc278c3aa1
LibC: Missing varargs cleanup in fcntl
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
4ca493a86a
UserspaceEmulator: Extra format arguments in MallocTracker, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
5a3cc2da8b
UserspaceEmulator: Identical code on both branches, unify return in virt$ioctl
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
7688539402
UserspaceEmulator: Fix conditionally uninitialized locals in virt$select
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
f7b1591a5c
SystemMonitor: Uninitialized struct member in ProcessModel, found by Coverity
...
This is really a nop, as the cpu_percent is computed later. Zero the
value just to keep things sane.
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
c1fd41c38c
LibLine: Uninitialized members in Editor, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
3ee0917dcb
SoundPlayer: Uninitialized variable in SoundPlayerWidget, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
0ca00639a9
LibThread: Uninitialized member variable in Thread, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
e160181a73
Piano: Uninitialized member variables in RollWidet, found by Coverity
...
This seem like they wouldn't cause any problems in reality,
but it's nice to fix them to avoid any future misuse.
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
eed9f2bac3
Chess: Uninitialized member in PromotionalDialog, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
832b3256d3
LibWeb: Remove unused member in LayoutNodeWithStyle, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
82b3dab1b5
LibELF: Fix uninitialized member variable in DynamicLoader, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
82dbf76dee
LibCompress: Fix uninitialized member variable in Zlib, found by Coverity
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
ff0c7da75d
AK: Add SFINAE fallback for AK C++ concepts use, for Coverity compiler
...
The Coverity compiler doesn't support C++2a yet, and thus doesn't
even recognize concept keywords. To allow serenity to be built and
analyzed on such compilers, add a fallback underdef to perform
the same template restriction based on AK::EnableIf<..> meta
programming.
Note: Coverity does seem to (annoyingly) define __cpp_concepts, even
though it doesn't support them, so we need to further check for
__COVERITY__ explicitly.
2020-08-17 09:17:57 +02:00
Nico Weber
2030a49a1e
malloc: Remove unused Bitmap.h include
2020-08-17 09:10:06 +02:00
Nico Weber
de4a9c61d7
malloc: Fix build with RECYCLE_BIG_ALLOCATIONS not defined
2020-08-17 09:10:06 +02:00
Nico Weber
344090a5b0
malloc: Add comments spelling out the MAGIC_HEADERS in ascii
2020-08-17 09:10:06 +02:00
Nico Weber
96ff0971ea
Kernel: Remove a comment that has been stale since 7a64f55c0f
2020-08-17 09:10:06 +02:00
Ben Wiederhake
b0aa8115c2
Userland: Provide a misbehaving application
...
This will be a test case for #2977 .
2020-08-17 00:01:13 +02:00
Andreas Kling
1e4c43bbd0
Kernel: Remove strncpy() and strrchr()
...
These are not called anywhere in the kernel anyway.
2020-08-17 00:00:46 +02:00
Sarah
ee912e023c
LibGfx: Move original StylePainter code to ClassicStylePainter
...
StylePainter should continue to work the same as before.
2020-08-17 00:00:34 +02:00
Sarah
d0900228d0
LibGfx: Add abstract StylePainter class
...
StylePainter's behavior is now handled by a static instance
of BaseStylePainter. The original static behavior of StylePainter
is left as-is for API compatibility.
2020-08-17 00:00:34 +02:00
asynts
868bd2e43d
LibCrypto: Call bytes() explicitly instead of implicitly.
...
This was a careless mistake.
https://github.com/SerenityOS/serenity/pull/3166#discussion_r471131732
2020-08-17 00:00:14 +02:00
asynts
aef6f00195
AK: Always call memmove in Span instead of memcpy.
...
https://github.com/SerenityOS/serenity/pull/3166#discussion_r471031704
2020-08-17 00:00:14 +02:00
Nico Weber
5de131667a
LibHTTP: Remove unused private field m_queued_finish in HttpsJob ( #3181 )
2020-08-16 23:58:50 +02:00
Andreas Kling
154a184c1b
Browser: Add a debug menu action for triggering a JS garbage collection
...
Triggering a GC this way will print a report afterwards so you can see
how much memory is currently used by the JS heap. :^)
2020-08-16 20:35:03 +02:00
Andreas Kling
bbd3192535
LibJS: Add API for doing GC with a little debug log report at end
...
You can now pass print_report=true to Heap::collect_garbage() and it
will print out a little summary of the time spent, and counts of
live vs freed cells and blocks.
2020-08-16 20:33:56 +02:00
Andreas Kling
6444f49d22
LibJS: Make StringOrSymbol not leak strings
...
Ideally this thing would not allocate strings at all, but I'll leave
that as a separate exercise.
2020-08-16 20:31:05 +02:00
thankyouverycool
bc27aa9b6f
LibGUI: Use matching family fonts for TextEditor ruler
...
Fixes incorrect glyph sizes when drawing bold line counts.
2020-08-16 19:39:46 +02:00
thankyouverycool
126a03f087
LibGfx: Add initial font family matching
...
Fonts following the TypefaceWeightSize naming scheme now associate
with bold weights of the same name and glyph size on construction.
2020-08-16 19:39:46 +02:00
thankyouverycool
a5fefbf840
LibGUI: Resize TextEditor ruler based on needed space
...
Ruler width is now calculated according to the number of digits
in the line count.
2020-08-16 19:39:46 +02:00
thankyouverycool
15cb4207fc
TextEditor: Put fonts in exclusive action group
2020-08-16 19:39:06 +02:00
Nico Weber
4a57cbc98f
LibX86: Remove some allocations from Instruction::to_string
...
Instruction::to_string used to copy a string literal into a String,
and then the String into a StringBuilder. Copy it to the StringBuilder
directly.
No measurable performance benefit, but it's also less code.
2020-08-16 19:38:55 +02:00
thankyouverycool
5558b2cf9f
Base: Rename Pebbleton to reflect actual height
...
And update programs loading it from file.
2020-08-16 19:38:21 +02:00
Nico Weber
f025204dfe
disasm: For ELF inputs, pass an ELFSymbolProvider to disassembler
...
This lets disasm output contain the symbol names of call and jump
destinations:
8048111: e8 88 38 01 00 call 805b99e <__cxa_atexit>
...
8048150: 74 15 je 8048167 <_start+0x4c>
The latter (the symbol of the current function with an offset) is
arguably more distracting than useful because you usually want to look
at the instruction at the absolute offset in this case, but the former
is very nice to have.
For reasons I do not understand, this cuts the time to run
`disasm /bin/id` in half, from ~1s to ~0.5s.
2020-08-16 19:37:58 +02:00
Nico Weber
fd73de684e
X86+Profiler+UserspaceEmulator: Deduplicate ELFSymbolProvider to LibX86
...
From a layering perspective, it's maybe a bit surprising that the
X86::SymbolProvider implementation also lives in LibX86, but since
everything depends on LibELF via LibC, and since all current
LibX86-based disassemblers want to use ELFSymbolProvider, it makes
some amount of sense to put it there.
2020-08-16 19:37:58 +02:00
Andreas Kling
d396766058
LibGUI: Require a model pointer for ModelIndex::is_valid()
...
This was not an issue anywhere in practice, but let's make it part of
the definition of a valid model index.
2020-08-16 16:44:09 +02:00
Andreas Kling
a66e55ec64
LibGUI: Make SortingProxyModel clear view selections aggressively
...
When invalidating all indexes, tell all attached views to just wipe
their selections. This is the best we can do for now.
2020-08-16 16:44:09 +02:00
Andreas Kling
9102b624ac
LibGUI+DevTools+Applications: Use ModelIndex::data() in many places
...
This way you don't have to keep track of which model it came from.
2020-08-16 16:44:09 +02:00
Andreas Kling
96f98b1fc9
LibGUI: Simplify TableCellPaintingDelegate API slightly
...
No need to pass the Model *and* a ModelIndex, the index knows which
model it belongs to anyway.
2020-08-16 16:44:09 +02:00
Andreas Kling
f882424869
LibGUI: Add ModelIndex::data(ModelRole)
...
This is a convenience API that makes accessing model data easier.
2020-08-16 16:44:09 +02:00
Andreas Kling
a1e381a0f8
LibGUI: Move GUI::Model::Role to GUI::ModelRole
...
This is preparation for using ModelRole in the ModelIndex API.
2020-08-16 16:44:09 +02:00
Andreas Kling
f6d7204689
LibGUI: Enable switching FilePicker into columns view mode :^)
2020-08-16 16:44:09 +02:00