exec, dos: assorted bug fixes#148
Open
RMortenB wants to merge 2 commits intoApolloTeam-dev:masterfrom
Open
Conversation
- fgets: bail early on zero-length buffer, decrement once - getvar: close file handle on the size-lookup failure path - runhandler: UnLock dir on the LoadSeg success path - splitname: bail early on zero-size buffer
- switch HANDLE_MANAGED_MEM tests from #ifdef to #if (the macro is defined as 0 when disabled, so #ifdef was wrong) - memory: free-list consistency, MEMF_MANAGED tests, pool fixes - memory_nommu: round byteSize up to MEMCHUNK_TOTAL in AllocMem - newaddtask: pass MemEntry list head correctly - prepareexecbase: respect "nomungwall" arg, OR-in stacksnoop flag instead of clobbering, fix Preparation debug print - remtask: Disable around list removal to protect against interrupt-level Signal moving the task between lists - signal: priority comparison uses strict greater-than for preemption; corrected debug-print arguments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bug fixes for
rom/exec/androm/dos/collected while working on ApolloOS. Behavior on the fast path is preserved; the changes target corner cases.exec
HANDLE_MANAGED_MEMtests from#ifdefto#if(the macro is#defined as0so#ifdefwas wrong)nommu_AllocMemroundsbyteSizetoMEMCHUNK_TOTALbefore the memheader scanPrepareExecBaserespectsnomungwall, OR-s inEXECF_StackSnoop, fixes the "Preperation" debug printRemTaskaddsDisable()aroundRemove()so interrupt-levelSignal()cannot race the unlinkSignal()uses strict>for preemption priorityAlert(... AT_DeadEnd ...)paths gain explicitreturnso a non-DeadEnd alert can't fall throughdos
fgetsbails early on zero-length buffer, decrements oncegetvarcloses file handle on the size-lookup failure pathrunhandlerUnLocks dir on the LoadSeg success pathsplitnamebails early on zero-size bufferTest plan