Page MenuHomeFreeBSD

patch(1): Sync with OpenBSD.
Changes PlannedPublic

Authored by delphij on May 17 2017, 7:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 22 2024, 2:05 AM
Unknown Object (File)
Dec 23 2023, 2:02 AM
Unknown Object (File)
Sep 14 2023, 2:42 PM
Unknown Object (File)
Aug 19 2023, 9:31 PM
Unknown Object (File)
Aug 18 2023, 9:25 PM
Unknown Object (File)
Aug 17 2023, 9:28 PM
Unknown Object (File)
Aug 12 2023, 9:12 PM
Unknown Object (File)
Aug 2 2023, 9:57 AM
Subscribers

Details

Reviewers
emaste
pfg
kib
Summary

Sync with OpenBSD except recallocarray().

Test Plan

tested a few patch files; maybe request for a full exprun.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9323
Build 9787: arc lint + arc unit

Event Timeline

pfg requested changes to this revision.May 17 2017, 1:29 PM

This has basically all the changes I have tried to avoid.

OpenBSD doesn't have a "restricted" ed (red) so they brought in the minimal ed(1) functionality to use pledge. I do not think we are considering bringing pledge to FreeBSD so I have been avoiding such changes. I guess some of the changes would make sense if they made it easier to use capsicum, however last time I tried, the big problem for capsicum is the use of temporary files.

I would personally prefer we keep having our own fork of patch(1) instead of adopting useless OpenBSDisms.

usr.bin/patch/patch.c
157

Do we really want to start bringing this crap?

We forked DragonFly's patch(1) and last time I checked, OpenBSD was not interested in our changes.

usr.bin/patch/pch.c
136

Hmm.. I did this and then was asked to revert this for good reasons. The memory will be realloc'ed so zeroing makes no sense.

OpenBSD does this to prevent overflows, is this really a concern? I also don't like the cast.

159

I thought the title claimed to be *without* reallocarray :).

Is there a real concern that the index can overflow? Using our reallocf(3) saved a lot of NULL checks here and made the code more readable.

This revision now requires changes to proceed.May 17 2017, 1:29 PM

Need to address issues raised (plus some changes were not correct, need to re-do the dynamic buffer related code).

linimon retitled this revision from Sync with OpenBSD. to patch(1): Sync with OpenBSD..Jul 19 2018, 5:28 AM