memory-safety Questions
9
Solved
I am on CentOS 6.4 32 bit and am trying to cause a buffer overflow in a program. Within GDB it works. Here is the output:
[root@localhost bufferoverflow]# gdb stack
GNU gdb (GDB) Red Hat Enterpris...
Yong asked 21/7, 2013 at 17:55
9
Solved
According to Wikipedia
Computer scientists consider a language "type-safe" if it does not allow operations or conversions that violate the rules of the type system.
Since Python runtime checks...
Pad asked 24/9, 2017 at 8:57
1
I was porting some older high-speed C++ code to C#, and the existing code made use of a pointer-based double-indirection pattern like this (written here in a C# syntax), using the stack as efficien...
Sandrasandro asked 27/5, 2022 at 13:37
2
Solved
According the documentation for std::Vec, calling shrink_to_fit() will cause the Vec's capacity to "drop down as close as possible to the length but the allocator may still inform the vector t...
Kinesthesia asked 24/11, 2022 at 4:54
1
Solved
With Deno being the new Node.js rival and all, the memory-safe nature of Rust has been mentioned in a lot of news articles, one particular piece stated Rust and Go are good for their memory-safe na...
Antoniettaantonin asked 23/5, 2020 at 15:23
1
Solved
Experimenting with the programming language Rust, I found that the compiler is able to track a move of a field of some struct on the stack very accurately (it knows exactly what field has moved).
H...
Enterostomy asked 20/5, 2017 at 4:20
2
Solved
If I have a struct that encapsulates two members, and updates one based on the other, that's fine as long as I do it this way:
struct A {
value: i64
}
impl A {
pub fn new() -> Self {
A { va...
Spiritoso asked 18/3, 2017 at 19:50
2
Solved
I understand the usage and superficial differences between weak and unowned in Swift:
The simplest examples I've seen is that if there is a Dog and a Bone, the Bone may have a weak reference to th...
Saar asked 16/3, 2017 at 18:40
3
Solved
I've been trying to get my head around the Rust borrowing and ownership model.
Suppose we have the following code:
fn main() {
let a = String::from("short");
{
let b = String::from("a long lon...
Persona asked 15/3, 2017 at 10:53
2
Solved
Is it possible to either create a coding standard or use of a library that can be proved to eliminate any memory management errors in C++?
I'm thinking of something like Java, it is just impossibl...
Sayyid asked 12/1, 2017 at 15:3
1
Solved
Safety critical projects do not recommend any dynamic allocations or freeing allocated memory. Only during elaboration/initialization phase of the program execution, it is allowed.
I know most of...
Curate asked 14/4, 2016 at 8:49
1
Solved
Is it possible to manually clear out the contents of an object from memory?
In particular, I'm dealing with NSData. I've tried using data.length = 0 and data.setData(NSData).
I know ARC will com...
Woodsum asked 10/6, 2016 at 17:6
3
Solved
I have read somewhere that in a language that features pointers, it is not possible for the compiler to decide fully at compile time whether all pointers are used correctly and/or are valid (refer ...
Westberry asked 14/4, 2015 at 13:28
1
I'd like to use Haskell's quickcheck library test some C code. The easiest way seems to be doing a foreign import and write a property on top of the resulting haskell function. The problem with thi...
Kinder asked 8/8, 2014 at 10:12
1
© 2022 - 2024 — McMap. All rights reserved.