由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 讨论几个general question
相关主题
一个几百个文件的程序有memory leak,如何debugA家onsite几个问题
有人有直接onsite的经验吗?四月一号了,报几个offer
刚phone interview完,求祝福,谢谢问个越界的问题
大家看看我写的这个itoa有没有buglongest valid Parentheses有O(n)算法么
帮忙看看我写的atoi有没有bug, 谢谢贴一个OJ 的 longest valid parenthesis
Google到底需要什么样的人才?对于10+工作经验的人请教一道Leetcode 题, 多谢
Failed B Phone Interview...做了一下 Google 的 Best Time to Buy and Sell Stock II
贡献几个题请教leetcode一道题
相关话题的讨论汇总
话题: mem话题: check话题: leaking话题: general话题: question
进入JobHunting版参与讨论
1 (共1页)
d**f
发帖数: 264
1
很多时候,on-site的时候会讨论一些非常看似general的question,但是interviewer可
以从跟你的交谈中,得到很多信息.我想请问几个问题,大家跟interviewer交流的时候,
有什么经验.
1. How to check mem leaking ?
2. How to check int overflow ?
3. There is a bug in your program. How to find it ?
s*****n
发帖数: 5488
2

use secondary mem allocation system.
add a fxcop or what rule to check all cases,
a + b < a
get a repro first. if you still cannot figure out, add instrumentation.
add asserts.
add checkpoints.

【在 d**f 的大作中提到】
: 很多时候,on-site的时候会讨论一些非常看似general的question,但是interviewer可
: 以从跟你的交谈中,得到很多信息.我想请问几个问题,大家跟interviewer交流的时候,
: 有什么经验.
: 1. How to check mem leaking ?
: 2. How to check int overflow ?
: 3. There is a bug in your program. How to find it ?

d**f
发帖数: 264
3

1.This is answer to how to avoid mem leaking.
If there is mem leaking already in other peoples code, how to check?
2. if you want assign a+b to c, you need check if b < (NMAX-a).
Another thing you need pay attention to, 0 mid = i+(j-i)/2;
3.
debug tools. gdb,windbg
memory debug tools
crash dump analysis
static code analysis
Q: There is a program. Sometime it works, sometime it crash.How to find this
bug?
A: Mostly it is caused by uninitialized vars or overflow or pointer mistake.
Q: If the program is written by C#.
A: ?

【在 s*****n 的大作中提到】
:
: use secondary mem allocation system.
: add a fxcop or what rule to check all cases,
: a + b < a
: get a repro first. if you still cannot figure out, add instrumentation.
: add asserts.
: add checkpoints.

1 (共1页)
进入JobHunting版参与讨论
相关主题
请教leetcode一道题帮忙看看我写的atoi有没有bug, 谢谢
请教两个题Google到底需要什么样的人才?对于10+工作经验的人
问题:数组找sum不小于key的元素个数最小的子数组Failed B Phone Interview...
有几个问题不明白大家能不能解答一下 谢谢!贡献几个题
一个几百个文件的程序有memory leak,如何debugA家onsite几个问题
有人有直接onsite的经验吗?四月一号了,报几个offer
刚phone interview完,求祝福,谢谢问个越界的问题
大家看看我写的这个itoa有没有buglongest valid Parentheses有O(n)算法么
相关话题的讨论汇总
话题: mem话题: check话题: leaking话题: general话题: question