Commit Graph

20059 Commits

Author SHA1 Message Date
uwe 172da20a8e Fix grammar. 2020-07-30 21:23:36 +00:00
christos a5cb7ebb06 this file contained the same information as extattr_namespace_to_string.3
and somewhat incorrect too.
2020-07-26 18:10:00 +00:00
christos 1abb353bae If Unwind_Backtrace is broken, ctx.n will still contain ~0, and we will
return that which poor behavior for the user, so return 0 instead.
We could document ~0 to be an error, but that would deviate from the
Linux behavior which is not desirable. Noted by Poul-Henning Kamp
2020-07-26 15:53:05 +00:00
christos 66a0459ab7 remove duplicate, noted by chuq (this was never used).
perhaps either move extattr.c from generic here, or move the man page
extattr.3 in gen?
2020-07-25 21:53:34 +00:00
msaitoh 984bb2b315 s/reseting/resetting/ 2020-07-22 01:24:39 +00:00
wiz b46ced516b Remove trailing whitespace. 2020-07-17 18:58:11 +00:00
kamil 07e8492e26 Add ppoll() a compatibility wrapper around pollts(2)
Submitted by Apurva Nandan.
2020-07-17 15:34:16 +00:00
uwe ccb2ee4b73 newwin - fix crash with negative ncols.
When support for negative nrows/ncols was added, one s/ncols/maxx/ was
missed so we ended up passing negative (i.e. huge unsigned) length
when hashing the line contents.

Reported by Naman Jain in PR lib/55484
2020-07-14 04:39:39 +00:00
christos 6953eca8c7 Fix numeric variable handling in settc (lyzliyuzhi at 163 dot com) 2020-07-10 20:34:24 +00:00
uwe 70f6ed9ef6 Pads are not to be automatically refreshed on input.
X/Open Curses says in the documentation for newpad():

  Automatic refreshes of pads (e.g., from scrolling or echoing of
  input) do not occur.

And in the documentation for get*():

  If the current or specified window is not a pad, and it has been
  moved or modified since the last refresh operation, then it will be
  refreshed before another character is read.

From Michael Forney in PR lib/55457
2020-07-06 23:33:38 +00:00
uwe f6dea36d0e mvwins*(WINDOW *win, ...) functions - call wins* on win, not stdscr.
From Naman Jain in PR lib/55460.
2020-07-06 22:46:50 +00:00
christos 65c5691e7d revert previous; utmpxname is already documented in getlastlogx.3. Should
probably be moved.
2020-07-05 01:09:48 +00:00
christos 20e726508c document utmpxname(3) 2020-07-05 01:05:50 +00:00
uwe 71a0f0ceb5 wtouchln - verify/clip input parameters
From Naman Jain in PR lib/55454
2020-07-03 23:28:51 +00:00
uwe 939fb589cb setcchar - don't lose combining marks to a typo.
We copy len wchars but set the length field to 1, instead of len.
From Naman Jain in PR lib/55443
2020-07-02 23:43:01 +00:00
uwe 1765a45b05 hline, vline - don't lose attributes when using default character.
Make default (wide) and non-wide behavior match.  If the character
argument has (only) attributes set, use them with the default line
character.

In the wide case don't do the fallback in hline - it just calls
hline_set that needs to do it anyway.  Fix the latter to check the
wcwidth of the right character and avoid division by zero.
2020-07-01 02:57:01 +00:00
uwe 4eb5fad78b Oops. Fix y/x typo in the previous whline() fix for !HAVE_WCHAR. 2020-07-01 02:14:41 +00:00
uwe d9a8ae84b1 Fix indentation in the copyright.
Make it match its siblings in other files.
2020-06-30 21:27:18 +00:00
uwe 9c6a61e7ae whline - save/restore the y coordinate too.
Reaching the right side of the screen can cause a line wrap.
Forgot to apply the fix to the !HAVE_WCHAR case.
PR lib/55434
2020-06-30 21:10:13 +00:00
uwe 1eecb61d77 whline_set - save/restore the y coordinate too.
Reaching the right side of the screen can cause a line wrap.
PR lib/55434
2020-06-30 21:02:24 +00:00
wiz b633f84bf0 Remove Xr to extattr(2) which we don't have. 2020-06-28 21:37:05 +00:00
christos 3d58360bad reality check 2020-06-28 18:23:01 +00:00
rin bda9e4fdad Turn on _UC_TLSBASE for sure in the same manner as other ports.
No functional changes since that flag is turned on via getcontext(2).
2020-06-22 06:49:04 +00:00
roy f236a33b97 libterminfo: cast to uint16/32_t before conversion to preserve negativity
Otherwise the ABSENT_NUMERIC(-1) or CANCELLED_NUMERIC(-2) will be converted
incorrectly to size_t and then down to uint16/32_t.
Picked up by DIAGNOSTIC builds.

Thanks to Michael Forney for the fix for PR lib/52293.
2020-06-21 15:05:23 +00:00
wiz 143a74fba3 Remove reference to non-existing extattr(2) and fix two other xrefs. 2020-06-18 19:47:41 +00:00
wiz 1b3734281f Add RCS Id. 2020-06-18 19:46:34 +00:00
kamil aa97815be0 Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
2020-06-17 00:16:21 +00:00
christos 2f0bfbf344 Rename blacklist -> blocklist 2020-06-15 01:57:29 +00:00
ad 7a60fa0a18 Another bug. The CAS loop in pthread_cond_signal() could race against the
thread it is trying to awake.  The thread could exit the condvar and then
reinsert itself at the head of the list with a new waiter behind it.  It's
likely possible to fix this in a way that's wait-free but for now just fix
the bug.
2020-06-14 21:33:28 +00:00
ad 6088a8599a Don't need to ignore ESRCH from _lwp_park() any more. 2020-06-14 21:31:11 +00:00
riastradh 025a8ce8b7 Nix trailing whitespace. 2020-06-13 17:39:42 +00:00
kamil d8442aacf9 Fix incompatible function pointer casts 2020-06-13 16:51:59 +00:00
fox 113ec9c52a lib/libpam: Fix the possible -Werror=stringop-truncation
Replace strncpy(3) with the safer strlcpy(3) and adjust the code.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@, christos@
2020-06-12 01:20:32 +00:00
ad 30140ed218 Drop self->pt_lock before clearing TSD / malloc TSD. 2020-06-11 18:42:02 +00:00
ad 2b4d53924f Adjust memory barriers. 2020-06-11 18:41:22 +00:00
ad 62e0939e7d - Make pthread_condvar and pthread_mutex work on the stack rather than in
pthread_t, so there's less chance of bad things happening if someone calls
  (for example) pthread_cond_broadcast() from a signal handler.

- Remove all the deferred waiter handling except for the one case that really
  matters which is transferring waiters from condvar -> mutex on wakeup, and
  do that by splicing the condvar's waiters onto the mutex.

- Remove the mutex waiters bit as it's another complication that's not
  strictly needed.
2020-06-10 22:45:15 +00:00
thorpej abcb66ec85 Update for proplib(3) API changes. 2020-06-07 05:54:00 +00:00
ad b81fe3a293 Adjust previous. In the condvar case the wakeup might already have been
eaten.
2020-06-06 22:23:59 +00:00
thorpej a792b8435e Improvements to the problib(3) API:
==> Provide a much more complete set of setters and getters for different
    value types in the prop_array_util(3) and prop_dictionary_util(3)
    functions.

==> Overhaul the prop_data(3), prop_number(3), and prop_string(3) APIs
    to be easier to use and less awkwardly named,  Deprecate the old
    awkward names, and produce link-time warnings when they are referenced.

==> Deprecate mutable prop_data(3) and prop_string(3) objects.  The old
    APIs that support them still exist, but will now produce link-time
    warnings when used.

==> When the new prop_string(3) API is used, strings are internally
    de-duplicated as a memory footprint optimization.

==> Provide a rich set of bounds-checked gettter functions in and a
    corresponding set of convenience setters in the prop_number(3) API.

==> Add a new prop_bool_value(3) function that is equivalent to
    prop_bool_true(3), but aligned with the new "value" routines in
    prop_data(3), prop_string(3), and prop_number(3).
2020-06-06 21:25:59 +00:00
roy c3293770af terminfo(5): Numbre -> Number
Thanks to yukonbob
2020-06-05 22:08:10 +00:00
nia d06dd93f7d Remove more bogus tests for 64-bit i386 and SuperH.
These are always false.
2020-06-05 11:16:15 +00:00
nia 35c066bcd5 getaddrinfo.3: order of the struct members is wrong, correct it 2020-06-04 11:28:00 +00:00
riastradh 0b4833402a Nix trailing whitespace. NFCI. 2020-06-04 04:40:01 +00:00
joerg 558a0c7357 If _malloc_thread_cleanup is implement, call it from libpthread.
Provide the hook from modern jemalloc to avoid using TSD for the thread
destruction cleanup as it can result in reentrancy crashes if fork is
called from a thread that never called malloc as it will result in a
late malloc from the pre-fork synchronisation handler.
2020-06-04 00:45:32 +00:00
ad 051faad4aa Deal with a couple of problems with threads being awoken early due to
timeouts or cancellation where:

- The restarting thread calls _lwp_exit() before another thread gets around
  to waking it with _lwp_unpark(), leading to ESRCH (observed by joerg@).
  (I may have removed a similar check mistakenly over the weekend.)

- The restarting thread considers itself gone off the sleep queue but
  at the same time another thread is part way through waking it, and hasn't
  fully completed that operation yet by setting thread->pt_mutexwait = 0.
  I think that could have potentially lead to the list of waiters getting
  messed up given the right circumstances.
2020-06-03 22:10:24 +00:00
kamil 5d0165c29d timespec_get(3) was developed by myself
Remove FreeBSD from the authorship as it was just a pullup of small
documentation changes.
2020-06-02 19:30:29 +00:00
nia d5d305cc98 Don't suggest removing arc4random with a libc bump.
It's established enough in non-legacy code that this is a terrible idea.
Even if we add getentropy it's not a comparable API (not a userspace RNG
capable of streaming large numbers of bytes, doesn't have _uniform, etc).

"Feel free to remove that line!" - riastradh
2020-06-02 13:56:30 +00:00
joerg b90f380e16 Don't overalign _RuneStatePriv, it must share the alignment of mbstate_t
it aliased with. Assert that the alignment actually used reflects the
alignment required by existing implementation and for newly build
modules assert that it is at most the guaranteed alignment.
2020-06-02 01:30:31 +00:00
joerg 34a4ae727b Pass down errno when calling pthread__errorfunc after a system call.
Allow format arguments for that reason and use (v)snprintf_ss in
pthread_errorfunc to avoid race conditions and the like.
2020-06-02 00:29:53 +00:00
ad 06d492d198 In the interests of reliability simplify waiter handling more and redo
condvars to manage the list of waiters with atomic ops.
2020-06-01 11:44:59 +00:00