bitkeeper-scm / bitkeeper

This is the master copy of the BitKeeper source
http://www.bitkeeper.org
Apache License 2.0
398 stars 74 forks source link

Some potential error handling bugs #6

Open HaoranLiu14 opened 1 year ago

HaoranLiu14 commented 1 year ago

While reading the newest codes, I found several suspicious codes that could be potential error handling bugs.

setsockopt is called without checking its return value in the following functions : TclSockMinimumBuffers, nt_loadWinSock.

chdir is called without checking its return value in the following functions : restore_wd, chdir_safer, pending_main, resolve_tags, abort_patch, gnupatch_main, export_main, sane, converge_hash_files.

setsockopt is called without checking its return value in sccs_gone.

move_remote is called without checking its return value in the following functions : free_slot, merge, copy_to_resync, converge

sccs_clean is called without checking its return value in converge.

mdbm_store is called without checking its return value in shrink_main.

I understand that some of them were intentionally removed for the purpose of simplifying your code. But I'm listing them in case you want to maintain them in the future.

wscott commented 1 year ago

That is a funny collection to list. Is this from some script? In this code base, you should be able to find 1000s of cases like this. Unfortunately, this repo is archived and unmaintained at this point. If you wanted to submit a pull request with changes, I could allow it if the code changes were obviously correct.

hart-NTP commented 1 year ago

I would love to see the github repo be an ongoing export of the bk repo, but I'm so far unable to reconstruct a complete bk repo of the bk source. Getting access to (n)bkbits files would definitely do it, but I could come close and/or reconstruct a working bk repo with a complete copy of a windows build tree from 7.x, right?

Ideally with a little cooperation we can revive bkbits.net as an active server hosted by nwtime.org/ntp.org. Less than ideally we could reconstruct the missing pieces and still end up with a complete, working bk source repo & bkbits BAM replacement.

little-bot commented 1 year ago

Sorry Dave,

I've been busy fishing. I need to go to the colo and get stuff rebooted. I'll try and do that tomorrow.

The reality is we have all moved on from BitKeeper. It's been painful for me, I gave BK close to 2 decades of my life and it didn't win. It's almost unused at this point.

I still think it's pretty neat technology, I was invited to an SCM summit that Google and Facebook put on a while back and it was 3 days of "oh, you want to do that? Yeah, we solved that, here's what we did". Over and over but the sad thing is that nobody seems interested even though it is all open source under a very permissive license.

Whatever, step 1 is for me to get the machines at the colo back up and then we can talk about how to move forward. NTP seems to love BK, can't blame you, we'd be happy to hand it all off to you. I can help a bit but I'm getting up there in years and am more focussed on being retired.

--lm

On Wed, May 03, 2023 at 03:35:45PM -0700, Dave Hart wrote:

I would love to see the github repo be an ongoing export of the bk repo, but I'm so far unable to reconstruct a complete bk repo of the bk source. Getting access to (n)bkbits files would definitely do it, but I could come close and/or reconstruct a working bk repo with a complete copy of a windows build tree from 7.x, right?

Ideally with a little cooperation we can revive bkbits.net as an active server hosted by nwtime.org/ntp.org. Less than ideally we could reconstruct the missing pieces and still end up with a complete, working bk source repo & bkbits BAM replacement.

-- Reply to this email directly or view it on GitHub: https://github.com/bitkeeper-scm/bitkeeper/issues/6#issuecomment-1533839198 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

--

Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat

hart-NTP commented 1 year ago

Thanks for the response. I have a very minor fix to bk on Windows which re-enables SSH support (at the cost of -j having any effect on Windows). The change is to revert to using pipes rather than socket pairs to connect to child processes. With bkbits online I'll be able to get a complete-enough bk source repo to build a fully-functioning installer for Windows with this change. Currently I fall short due to missing utilities like POSIX find.

hstenn commented 1 year ago

Larry, first, I hope you're having a great time fishing!

NTF and I have racks at FMT2 (we moved my rack from FMT1). I will likely be heading down there sometime in the next month or so to do some work. I'm happy to help in any way I can - be it (hopefully) smart hands in your rack, or copying/moving stuff to my rack. I'm open to discussing and helping in any way I can.