Email or username:

Password:

Forgot your password?
Top-level
Gankra

@mansr @tedmielczarek "i ported the code faithfully and now it constantly crashes on tripped assertions" tends to result in a lot of bugs being removed :)

(also faithfully porting the C code is impossible anyway because of the curse of integer promotion and the like... which is pure upside to lose in the translation and will probably randomly remove several bugs)

5 comments
Mans R

@Gankra @tedmielczarek Those assertions will only be tripped if your testing covers those cases, which it probably doesn't, or you would have already found the bugs.

There is also no guarantee that fixing type mismatches won't add bugs as well as remove some. I'd even say it's quite likely, having seen the mayhem caused by people "fixing" compiler warnings in C code without understanding it properly.

Mans R

@Gankra @tedmielczarek Don't get me wrong, built-in buffer overflow prevention is great, but wholesale code rewrites are much more risky than people seem willing to admit.

Gankra

@mansr you don't need to add any new tests/assertions, boring rust code will slap hundreds of new implicit assertions between unwraps(), bounds checks, and overflow checks and the like

Mans R

@Gankra If the C code passes your testing, then those tests are unlikely to trip any of the new (implicit) checks. That doesn't mean there are no bugs.

Ted Mielczarek

@mansr @Gankra you are moving the goal posts here but sure.

Go Up