summaryrefslogtreecommitdiff
path: root/src/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* In the incredibly unbelievable circumstance where _rs_init() fails toderaadt2019-03-241-2/+2
| | | | | | | | | allocate pages, don't call abort() because of corefile data leakage concerns, but simply _exit(). The reasoning is _rs_init() will only fail if someone finds a way to apply specific pressure against this failure point, for the purpose of leaking information into a core which they can read. We don't need a corefile in this instance to debug that. So take this "lever" away from whoever in the future wants to do that.
* escape backslashes;schwarze2019-03-201-3/+3
| | | | patch from Peter Piwowarski <peterjpiwowarski at gmail dot com>
* New futex(2) based rwlock implementation based on the mutex code.mpi2019-02-131-1/+12
| | | | | | | | | This implementation reduces contention because threads no longer need to spin calling sched_yield(2) before going to sleep. Tested by many, thanks! ok visa@, pirofti@
* Xr the byteorder funcs; from tim kuijstenjmc2019-02-131-3/+4
|
* I am retiring my old email address; replace it with my OpenBSD one.millert2019-01-2518-45/+45
|
* sort sections, and add a missing verb to the EXAMPLES text;jmc2019-01-221-24/+24
|
* Wrap long lineotto2019-01-221-4/+4
|
* a few tweakstedu2019-01-211-5/+9
|
* Add example showing a proper comparison function, as many examples showotto2019-01-211-3/+40
| | | | the wrong idiom. ok tedu@ but probably needs some tweakin
* include stdint.h over sys/types.hbcook2019-01-201-2/+2
| | | | ok deraadt@ tedu@
* Improve the description of locale dependency:schwarze2019-01-182-14/+20
| | | | | | | | * mention LC_COLLATE; * clarify that all these functions are infested, including the *_l() versions; * avoid ENVIRONMENT, these functions don't inspect it; * and point to the C library functions that change the locale. OK millert@
* Replace the vague, incorrect, and confusing BUGS sections with CAVEATSschwarze2019-01-183-12/+33
| | | | | | clearly stating which arguments have to be avoided, and mention the header files defining the constants required for the checks. Feedback and OK guenther@, OK bluhm@.
* For all functions known to be infected by LC_NUMERIC, add shortschwarze2019-01-162-4/+22
| | | | | | | | CAVEATS pointing to the new CAVEATS section in setlocale(3). Make those in wprintf(3) and wscanf(3) more concise since duplicate information is a bad idea. Incompleteness of information originally pointed out by millert@. OK millert@
* There are cases where a program doing dns requests wants to set theotto2019-01-141-2/+4
| | | | | Checking Disabled flag. Introduce a RES flag to do so. ok krw@ deraadt@ eric@
* Move default numer of pools in the multi-threaded case to 8. Various testsotto2019-01-101-2/+2
| | | | by me and others indicate that it is the optimum.
* Make the "not my pool" searching loop a tiny bit smarter, whileotto2019-01-102-22/+39
| | | | | | making the number of pools variable. Do not document the malloc conf settings atm, don't know yet if they will stay. Thanks to all the testers. ok deraadt@
* Improve speed for the multi-threaded case by reducing lock contention.otto2018-12-101-30/+21
| | | | tested by many; ok florian@
* style; OK ottoflorian2018-12-091-3/+3
|
* remove a stray line accidentally left behind in rev. 1.120;schwarze2018-12-051-3/+2
| | | | patch from Hiltjo Posthuma <hiltjo at codemadness dot org>
* Refactor "find the right pool" code into a function. ok djm@ tb@otto2018-11-271-65/+34
|
* fold the contents of malloc.conf.5 into malloc.3 and sysctl.2,jmc2018-11-211-6/+118
| | | | | | now that there is essentially no malloc.conf; text tweaked by deraadt; ok otto deraadt
* Introducing malloc_usable_size() was a mistake. While some otherotto2018-11-212-105/+5
| | | | | | | | | | | libs have it, it is a function that is considered harmful, so: Delete malloc_usable_size(). It is a function that blurs the line between malloc managed memory and application managed memory and exposes some of the internal workings of malloc. If an application relies on that, it is likely to break using another implementation of malloc. If you want usable size x, just allocate x bytes. ok deraadt@ and other devs
* Fix compilation on alpha, where DEF_WEAK() really must be paired withguenther2018-11-191-2/+1
| | | | PROTO_NORMAL(). Problem noted by deraadt@
* Implement malloc_usable_size(); ok millert@ deraadt@ and jmc@ for the man pageotto2018-11-182-6/+108
|
* Remove ethers(5) YP support bits from libc as it makes it difficult tobrynet2018-11-092-70/+8
| | | | | | | | effectively use pledge(2) in some programs. approval from many, thanks! idea by & ok deraadt@
* zap last remains of malloc.conf; prompted by and ok jmc@otto2018-11-081-6/+6
|
* rm FILES section; prompted by Janne Johanssonotto2018-11-061-7/+2
|
* Use the new vm.malloc_conf sysctl; ok millert@ deraadt@otto2018-11-061-6/+11
|
* Implement C11's aligned_alloc(3). ok guenther@otto2018-11-052-5/+84
|
* As per POSIX, when str{,r}chr is comparing it should convert c to a char.martijn2018-10-014-8/+10
| | | | | | | | | | The C implementation of str{,r}chr are not linked to the build, because assembly implementations are used, but change to code for easier reference. At least the i386 and amd64 are checked and seem to do the correct thing. Found thanks to the csh any/strchr change. minor pointers and OK millert@
* Fix typo in RFC number.tb2018-05-101-2/+2
| | | | ok benno
* Add a missing header when compiling with -DDEBUGdenis2018-04-301-1/+5
| | | | | | With advice from jca@ OK jca@ millert@
* reference hosts(5) instead of networks(5)schwarze2018-04-281-3/+3
|
* Remove references to the obsolete getnetent(3) and networks(5).schwarze2018-04-282-10/+7
|
* Stop talking about /etc/networks, which is no longer used,schwarze2018-04-281-39/+38
| | | | | | and reference gethostby*(3) and /etc/hosts instead. Say that setnetent(3), getnetent(3), and endnetent(3) now do nothing. With feedback from guenther and significant help from deraadt@.
* Say that sethostent(3), gethostent(3), and endhostent(3) do nothing.schwarze2018-04-281-50/+19
| | | | | | While here, stop implying plans to support additional address families in the future, and do not call gethostbyname2(3) "advanced". OK deraadt@ guenther@
* To allow us to get rid of /etc/networks, make setnetent(3),schwarze2018-04-281-75/+4
| | | | | | getnetent(3), and endnetent(3) do nothing, just like sethostent(3), gethostent(3), and endhostent(3) years ago. OK deraadt@ guenther@
* sys/uio.h is not used anymoreotto2018-04-071-3/+2
|
* fix MALLOC_STATS; spotted by and ok semarie@otto2018-03-301-1/+5
|
* use _ALIGN() which is uhm a bit OpenBSD-specific, but it means wederaadt2018-03-061-3/+2
| | | | | | don't need to use sys/param.h at all, guess which one i believe is greater namespace polution ok otto
* Use _MAX_PAGE_SHIFT, rather than #ifdef mips64deraadt2018-03-051-6/+2
| | | | ok guenther kettenis
* use consistent style for for loop in unmap(), no functional changeotto2018-02-071-4/+2
|
* keep in sync with ld.so malloc.cotto2018-01-301-2/+3
|
* word fix; from edgar pettijohnjmc2018-01-301-3/+3
|
* - An error in the multithreaded case could print the wrong function nameotto2018-01-281-12/+23
| | | | | | | - Start with a full page of struct region_info's - Save an mprotect in the init code: allocate 3 pages with none and make the middle page r/w instead of a r/w allocation and two calls to make the guard pages none
* - do not junk pages returned by free_bytes(), all freed chunks are alreadyotto2018-01-261-19/+19
| | | | | junked - freezero(): only clear requested size
* Zap the rotor, it was a wrong idea. Cluebat applied by kshe whootto2018-01-181-6/+3
| | | | | came also up with this diff. Simple, no bias and benchmarks show the extra random calls disappear in te measurement noise.
* Move to ffs(3) for bitmask scanning. I played with this earlier,otto2018-01-181-21/+11
| | | | | | | but at that time ffs function calls were generated instead of the compiler inlining the code. Now that ffs is marked protected in libc this is handled better. Thanks to kshe who prompted me to look at this again.
* Instead of trying to handle ffs() with the normal rename-mark-hidden-and-aliasguenther2018-01-182-4/+6
| | | | | | | dance, mark it protected. This works better for both gcc and clang: gcc blocks overriding of internal calls, while clang permits inlining again. ok otto@
* Adjust references for sysctl(3) to sysctl(2)deraadt2018-01-121-4/+4
|